Skip to content

Sample Reporting fails on cyclic dependency #111

Description

@jlink

Testing Problem

Exception when trying to sample an object with cyclic dependency:

@Example
void objectWithCyclicDependency() {
	List<Object> aList = new ArrayList<>();
	aList.add(42);
	aList.add(aList);

	ValueReport report = ValueReport.of(aList);
	report.singleLineReport();
}

Exception:

java.lang.NullPointerException
	at java.io.StringReader.<init>(StringReader.java:50)
	at net.jqwik.engine.support.JqwikStringSupport.toLines(JqwikStringSupport.java:99)
	at net.jqwik.engine.execution.reporting.ExecutionResultReportEntry.appendThrowableMessage(ExecutionResultReportEntry.java:128)
	at net.jqwik.engine.execution.reporting.ExecutionResultReportEntry.buildJqwikReport(ExecutionResultReportEntry.java:48)
	at net.jqwik.engine.execution.reporting.ExecutionResultReportEntry.from(ExecutionResultReportEntry.java:32)
	at net.jqwik.engine.execution.PropertyMethodExecutor.reportResult(PropertyMethodExecutor.java:142)
	at net.jqwik.engine.execution.PropertyMethodExecutor.executePropertyMethod(PropertyMethodExecutor.java:102)
	at net.jqwik.engine.execution.PropertyMethodExecutor.execute(PropertyMethodExecutor.java:44)
	at net.jqwik.engine.execution.PropertyTaskCreator.executeTestMethod(PropertyTaskCreator.java:129)
	at net.jqwik.engine.execution.PropertyTaskCreator.lambda$createTask$2(PropertyTaskCreator.java:55)
	at net.jqwik.engine.execution.pipeline.ExecutionTask$1.lambda$execute$0(ExecutionTask.java:31)
	at net.jqwik.engine.execution.lifecycle.CurrentTestDescriptor.runWithDescriptor(CurrentTestDescriptor.java:27)
	at net.jqwik.engine.execution.pipeline.ExecutionTask$1.execute(ExecutionTask.java:31)
	at net.jqwik.engine.execution.pipeline.ExecutionPipeline.runToTermination(ExecutionPipeline.java:82)
	at net.jqwik.engine.execution.JqwikExecutor.execute(JqwikExecutor.java:46)
	at net.jqwik.engine.JqwikTestEngine.executeTests(JqwikTestEngine.java:77)
	at net.jqwik.engine.JqwikTestEngine.execute(JqwikTestEngine.java:61)
	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:248)
	at org.junit.platform.launcher.core.DefaultLauncher.lambda$execute$5(DefaultLauncher.java:211)
	at org.junit.platform.launcher.core.DefaultLauncher.withInterceptedStreams(DefaultLauncher.java:226)
	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:199)
	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:132)
	at com.intellij.junit5.JUnit5IdeaTestRunner.startRunnerWithArgs(JUnit5IdeaTestRunner.java:69)
	at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:33)
	at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:230)
	at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:58)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions