Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sample Reporting fails on cyclic dependency #111

Closed
jlink opened this issue Jun 23, 2020 · 1 comment
Closed

Sample Reporting fails on cyclic dependency #111

jlink opened this issue Jun 23, 2020 · 1 comment
Labels

Comments

@jlink
Copy link
Collaborator

jlink commented Jun 23, 2020

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)
@jlink jlink added the bug label Jun 23, 2020
@jlink jlink closed this as completed in 136a2da Jun 23, 2020
@jlink
Copy link
Collaborator Author

jlink commented Jun 23, 2020

Fixed in 136a2da

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant