Skip to content

Commit 2e2369b

Browse files
committed
Update TestKitUtils.scala
1 parent 3ee1bac commit 2e2369b

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

testkit/src/main/scala/org/apache/pekko/testkit/TestKitUtils.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ private[pekko] object TestKitUtils {
4242
}
4343

4444
val startFrom = classToStartFrom.getName
45-
val classes = StackWalker.getInstance().walk(stackWalker)
45+
val classes = StackWalker.getInstance(StackWalker.Option.RETAIN_CLASS_REFERENCE)
46+
.walk(stackWalker)
4647
val filteredStack = classes.iterator
4748
// drop until we find the first occurrence of classToStartFrom
4849
.dropWhile(!_.getName.startsWith(startFrom))

0 commit comments

Comments
 (0)