-
Notifications
You must be signed in to change notification settings - Fork 34
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
Execution results are presented in case of any failure #314
Conversation
src/jvm/test/resources/expected_logs/infinite_spin_loop_events_cut.txt
Outdated
Show resolved
Hide resolved
src/jvm/main/org/jetbrains/kotlinx/lincheck/strategy/LincheckFailure.kt
Outdated
Show resolved
Hide resolved
src/jvm/main/org/jetbrains/kotlinx/lincheck/runner/ParallelThreadsRunner.kt
Outdated
Show resolved
Hide resolved
src/jvm/main/org/jetbrains/kotlinx/lincheck/execution/ExecutionResult.kt
Outdated
Show resolved
Hide resolved
@@ -27,20 +27,22 @@ class CompletedInvocationResult( | |||
/** | |||
* Indicates that the invocation has run into deadlock or livelock found by [ManagedStrategy]. | |||
*/ | |||
data object ManagedDeadlockInvocationResult : InvocationResult() | |||
class ManagedDeadlockInvocationResult(val results: ExecutionResult) : InvocationResult() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that all invocation results contain results
field, let's propagate this field to the parent class InvocationResult
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, take a look at
data object SpinCycleFoundAndReplayRequired: InvocationResult()
:
it doesn't contain results
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So let's change it to also contain results?)
Then it would be uniform, no special cases, no needs to do type-casts and type-checks (i.e. result is CompletedInvocationResult
) when we want to access results
field, etc.
src/jvm/main/org/jetbrains/kotlinx/lincheck/strategy/LincheckFailure.kt
Outdated
Show resolved
Hide resolved
@@ -27,20 +27,22 @@ class CompletedInvocationResult( | |||
/** | |||
* Indicates that the invocation has run into deadlock or livelock found by [ManagedStrategy]. | |||
*/ | |||
data object ManagedDeadlockInvocationResult : InvocationResult() | |||
class ManagedDeadlockInvocationResult(val results: ExecutionResult) : InvocationResult() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So let's change it to also contain results?)
Then it would be uniform, no special cases, no needs to do type-casts and type-checks (i.e. result is CompletedInvocationResult
) when we want to access results
field, etc.
Closes #244