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

Execution results are presented in case of any failure #314

Merged
merged 7 commits into from
May 2, 2024

Conversation

avpotapov00
Copy link
Collaborator

Closes #244

@avpotapov00 avpotapov00 requested a review from eupp April 24, 2024 16:06
@avpotapov00 avpotapov00 self-assigned this Apr 24, 2024
src/jvm/main/org/jetbrains/kotlinx/lincheck/Reporter.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()
Copy link
Collaborator

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.

Copy link
Collaborator Author

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

Copy link
Collaborator

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/Reporter.kt Outdated Show resolved Hide resolved
@avpotapov00 avpotapov00 requested a review from eupp April 25, 2024 17:08
src/jvm/main/org/jetbrains/kotlinx/lincheck/Reporter.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()
Copy link
Collaborator

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.

@avpotapov00 avpotapov00 requested a review from eupp April 30, 2024 15:10
@avpotapov00 avpotapov00 merged commit 6c145be into develop May 2, 2024
15 checks passed
@avpotapov00 avpotapov00 deleted the execution-results-any-failure branch May 2, 2024 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants