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

Repetitive assertions while using orComplainWith on an EventualConsequence #1799

Closed
sricharanya opened this issue Sep 5, 2019 · 2 comments
Closed

Comments

@sricharanya
Copy link

While using an EventualConsequence as follows:

theActorInTheSpotlight().should(eventually(seeThat(
            TheDashboard.visibility(), is(true)))
            .waitingForNoLongerThan(20).seconds()
            .orComplainWith(DashboardNotVisible.class));
    }

the consequence is asserting and writing debug logs for every lap of the 20 second timer. Is it possible to assert(complain) only when the entire timeout is elapsed?

This will be very much helpful for especially for logging. Even asserts that don't eventually cause a failure are getting a full stack dump logged every time they a test the assert. It get difficult to read the log file.

@wakaleo
Copy link
Member

wakaleo commented Sep 5, 2019

Sounds like a good improvement. Maybe take a look at the code and see if you can propose a PR (it should be a fairly easy change I think).

@patrickvkb
Copy link

Indeed, having also an assert when then entire timeout is elapsed would be useful. Be it only to be able to see appearing in the Serenity test reporting that something did not happen within the foreseen timeout.

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

No branches or pull requests

3 participants