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

Checkpoints must fail the test when they are flagged more number of times than initially specified #113

Closed
macjunk-ie opened this issue Mar 2, 2022 · 2 comments · Fixed by #114
Assignees
Labels
Milestone

Comments

@macjunk-ie
Copy link

I was expecting this test to fail but it passes:

 @org.junit.jupiter.api.Test
    public void checkpointsShouldFail_ifMoreThanRequiredNumberOfFlagsWereMarked(Vertx vertx, VertxTestContext testContext) {
        Checkpoint checkpoint = testContext.checkpoint(3);
        checkpoint.flag();
        checkpoint.flag();
        checkpoint.flag();
        checkpoint.flag(); // This flag must have caused the test to fail
    }

Similar to Mockito's behavior, is it feasible for checkpoints to fail if they see more flags then expected?
This is especially relevant since checkpoint is the strict version unlike the laxCheckpoint

@vietj vietj modified the milestones: 4.3.0, 4.2.6 Mar 3, 2022
@jponge
Copy link
Member

jponge commented Mar 3, 2022

Flagging 4 times a strict checkpoint shall indeed fail. I'll try to reproduce locally.

@jponge
Copy link
Member

jponge commented Mar 3, 2022

See #114

@jponge jponge added the bug label Mar 3, 2022
@jponge jponge linked a pull request Mar 3, 2022 that will close this issue
jponge added a commit that referenced this issue Mar 4, 2022
See #113

Correctness improvement: failing after having completed is necessary after all.
jponge added a commit that referenced this issue Mar 4, 2022
See #113

Correctness improvement: failing after having completed is necessary after all.

Signed-off-by: Julien Ponge <[email protected]>
jponge added a commit that referenced this issue Mar 5, 2022
See #113

Correctness improvement: failing after having completed is necessary after all.

Signed-off-by: Julien Ponge <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants