Skip to content

Commit

Permalink
Push the JVM harder to GC Stream’s head
Browse files Browse the repository at this point in the history
Remove the cap on Stream length via #take. Let it
either pass, or should fail due to OOM or timeout.
  • Loading branch information
ms-tg committed Feb 4, 2015
1 parent 31b0e95 commit f894c55
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/junit/scala/collection/immutable/StreamTest.scala
Expand Up @@ -24,7 +24,7 @@ class StreamTest {
val msgSuccessGC = "GC success"
val msgFailureGC = "GC failure"

val ref = WeakReference( Stream.continually(a).take(500) )
val ref = WeakReference( Stream.continually(a) )

def gcAndThrowIfCollected(dummy: A): B = {
System.gc()
Expand Down

1 comment on commit f894c55

@ms-tg
Copy link
Owner Author

@ms-tg ms-tg commented on f894c55 Feb 4, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Ichoran, per your advice on google groups, I removed the limitation on Stream size, and now it is passing every time locally. I think you may have solved it! :)

Please sign in to comment.