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

test: fix unfinished stubbing of command response writer #10605

Merged
merged 2 commits into from Oct 7, 2022

Conversation

oleschoenburg
Copy link
Member

@oleschoenburg oleschoenburg commented Oct 4, 2022

The engine is shared across multiple tests and not stopped in-between. With this change we only set up mocking of the response writer once and not for every test method. This ensures that mocking does not interfere with engine processing from previous tests which would show up as unfinished mocking exceptions.

closes #10604

@github-actions
Copy link
Contributor

github-actions bot commented Oct 4, 2022

Test Results

   936 files  +  2     936 suites  +2   1h 49m 34s ⏱️ - 1m 54s
7 607 tests  - 13  7 601 ✔️  - 13  6 💤 ±0  0 ±0 
7 797 runs   - 13  7 789 ✔️  - 13  8 💤 ±0  0 ±0 

Results for commit 7acd44d. ± Comparison against base commit c891576.

♻️ This comment has been updated with latest results.

Copy link
Member

@Zelldon Zelldon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm somehow not 100% convinced yet. Especially as the referenced issue also contains the reasoning for doAnswer/doReturn https://stackoverflow.com/questions/20353846/mockito-difference-between-doreturn-and-when/20360269#20360269

Maybe we can have another look at it.

@oleschoenburg oleschoenburg force-pushed the 10604-fix-flaky-stubbing branch 2 times, most recently from e7821af to 6d71a28 Compare October 7, 2022 07:26
The engine is shared across multiple tests and not stopped in-between.
With this change we only set up mocking of the response writer once and
not for every test method. This ensures that mocking does not interfere
with engine processing from previous tests which would show up as
unfinished mocking exceptions.
Copy link
Member

@Zelldon Zelldon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks 👍

@oleschoenburg
Copy link
Member Author

bors r+

zeebe-bors-camunda bot added a commit that referenced this pull request Oct 7, 2022
10605: test: fix unfinished stubbing of command response writer r=oleschoenburg a=oleschoenburg

The engine is shared across multiple tests and not stopped in-between. With this change we only set up mocking of the response writer once and not for every test method. This ensures that mocking does not interfere with engine processing from previous tests which would show up as unfinished mocking exceptions.

closes #10604 

Co-authored-by: Ole Schönburg <ole.schoenburg@gmail.com>
@zeebe-bors-camunda
Copy link
Contributor

Build failed:

@oleschoenburg
Copy link
Member Author

bors retry

@zeebe-bors-camunda
Copy link
Contributor

Build succeeded:

@zeebe-bors-camunda zeebe-bors-camunda bot merged commit 70c0fd2 into main Oct 7, 2022
@zeebe-bors-camunda zeebe-bors-camunda bot deleted the 10604-fix-flaky-stubbing branch October 7, 2022 12:30
@oleschoenburg
Copy link
Member Author

/backport

@backport-action
Copy link
Collaborator

Successfully created backport PR #10638 for stable/8.0.

@backport-action
Copy link
Collaborator

Successfully created backport PR #10639 for stable/8.1.

zeebe-bors-camunda bot added a commit that referenced this pull request Oct 7, 2022
10493: [Backport stable/8.0] fix(raft): handle exceptions on partition server init r=oleschoenburg a=megglos

# Description
Backport of #10450 to `stable/8.0`.

10566: [Backport stable/8.0] fix(helm): rename podSecurityContext to containerSecurityContext r=oleschoenburg a=backport-action

# Description
Backport of #10556 to `stable/8.0`.

relates to camunda/camunda-platform-helm#374

10624: [Backport stable/8.0] fix: take snapshot if nothing was exported since last snapshot r=oleschoenburg a=backport-action

# Description
Backport of #10611 to `stable/8.0`.

relates to #9761

10638: [Backport stable/8.0] test: fix unfinished stubbing of command response writer r=oleschoenburg a=backport-action

# Description
Backport of #10605 to `stable/8.0`.

relates to #10604

Co-authored-by: Meggle (Sebastian Bathke) <sebastian.bathke@camunda.com>
Co-authored-by: Ole Schönburg <ole.schoenburg@gmail.com>
zeebe-bors-camunda bot added a commit that referenced this pull request Oct 7, 2022
10639: [Backport stable/8.1] test: fix unfinished stubbing of command response writer r=oleschoenburg a=backport-action

# Description
Backport of #10605 to `stable/8.1`.

relates to #10604

Co-authored-by: Ole Schönburg <ole.schoenburg@gmail.com>
zeebe-bors-camunda bot added a commit that referenced this pull request Oct 7, 2022
10493: [Backport stable/8.0] fix(raft): handle exceptions on partition server init r=oleschoenburg a=megglos

# Description
Backport of #10450 to `stable/8.0`.

10566: [Backport stable/8.0] fix(helm): rename podSecurityContext to containerSecurityContext r=oleschoenburg a=backport-action

# Description
Backport of #10556 to `stable/8.0`.

relates to camunda/camunda-platform-helm#374

10624: [Backport stable/8.0] fix: take snapshot if nothing was exported since last snapshot r=oleschoenburg a=backport-action

# Description
Backport of #10611 to `stable/8.0`.

relates to #9761

10638: [Backport stable/8.0] test: fix unfinished stubbing of command response writer r=oleschoenburg a=backport-action

# Description
Backport of #10605 to `stable/8.0`.

relates to #10604

Co-authored-by: Meggle (Sebastian Bathke) <sebastian.bathke@camunda.com>
Co-authored-by: Ole Schönburg <ole.schoenburg@gmail.com>
@korthout korthout added the version:8.1.1 Marks an issue as being completely or in parts released in 8.1.1 label Oct 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
version:8.1.1 Marks an issue as being completely or in parts released in 8.1.1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CreateProcessInstanceWithResultTest is flaky
4 participants