[2.x] fix: Adjust the forked test classpath (#9170)

**Problem**
We can't test WorkerMain using forked test.

**Solution**
Allow WorkerMain to be shadowed.
This commit is contained in:
eugene yokota 2026-05-03 02:36:00 -04:00 committed by GitHub
parent 4ec3a753e7
commit 5586488f6c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 2 deletions

View File

@ -35,11 +35,12 @@ object WorkerExchange:
extraCp: Seq[File],
connectionType: WorkerConnection,
): WorkerProxy =
val fullCp = Seq(
// put extraCp first so we can shadow the WorkerMain class
val fullCp = extraCp ++ Seq(
IO.classLocationPath(classOf[WorkerMain]).toFile,
IO.classLocationPath(classOf[Framework]).toFile,
IO.classLocationPath(classOf[Gson]).toFile,
) ++ extraCp
)
val inputRef = Promise[OutputStream]()
val socketOpt = connectionType match
case WorkerConnection.Tcp =>