Skip to content

Commit f142d85

Browse files
committed
removes non-determinism in reflection-sync-potpourri
Depending on the environment in which the test is run, s1 can be either “String” or “java.lang.String”. This is one of the known non-deterministic behaviors of our reflection, caused by prefix stripping only working for packages defined in the root mirror. Until we fix this, I suggest we make the test more lenient.
1 parent 8c1505f commit f142d85

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/pending/run/reflection-sync-potpourri.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ object Test extends App {
2424
override def run(): Unit = {
2525
val s1 = foo("42")
2626
val s2 = perms(diceRolls(i - 1)).map(x => force(x)).sorted.mkString(", ")
27-
assert(s1 == "java.lang.String")
27+
assert(s1 == "String" || s1 == "java.lang.String")
2828
assert(s2 == "java.lang.annotation.Annotation, java.lang.reflect.Method, scala.io.BufferedSource, scala.io.Codec")
2929
}
3030
})

0 commit comments

Comments
 (0)