-
Notifications
You must be signed in to change notification settings - Fork 45
Description
Description
Fuzzer doesn't generate any values when given 100
recursive seeds, even though Configuration.recursionTreeDepth
is kept at default value (i.e. 4
).
Note: fuzzer doesn't need to explore all
Real world example
When using static methods for creating values is supported, there will be 50
seeds for generating java.time.LocalDateTime
type, most of which require another instance of java.time.LocalDateTime
or some other type that also has a lot of static methods that can create it.
To Reproduce
Run the following unit test.
@Test
@Timeout(10, unit = TimeUnit.SECONDS) // withTimeout(1000) works inconsistently
fun `fuzzer works when there are many recursive seeds`() {
class Node(val parent: Node?)
runBlocking {
var seenAnything = false
withTimeout(1000) {
runFuzzing(
{ _, _ -> List(100) {Seed.Recursive<Unit, Node?>(
construct = Routine.Create(listOf(Unit)) { (parent) -> Node(parent) },
modify = emptySequence(),
empty = Routine.Empty { null }
)}.asSequence() },
Description(listOf(Unit))
) { _, _ ->
seenAnything = true
BaseFeedback(Unit, Control.STOP)
}
}
assertTrue(seenAnything) { "Fuzzer hasn't generated any values" }
}
}
Expected behavior
Test passes.
Actual behavior
Test fails.
Visual proofs (screenshots, logs, images)
fuzzer works when there are many recursive seeds() timed out after 10 seconds
Metadata
Metadata
Assignees
Labels
Type
Projects
Status