-
Notifications
You must be signed in to change notification settings - Fork 21
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
Matcher to test timeouts #133
Comments
@0crat in |
@llorllale Job #133 is now in scope, role is |
Bug was reported, see §29: +15 point(s) just awarded to @llorllale/z |
@llorllale usually, with Don't you think we should have something like this instead: new Assertion<>(
"runs in 5 seconds max",
() -> new TextOf("test"),
new MatchesBefore(
new TextIs("test"),
5, TimeUnit.SECONDS
)
).affirm(); An alternative would be for |
@0crat wait for ARC answer |
@victornoel The impediment for #133 was registered successfully by @victornoel/z |
@victornoel There is an unrecoverable failure on my side. Please, submit it here:
0.48.2: CID: c14f0688-f370-4ed4-ba68-74a01385b4fc, Type: "Impediment was registered" |
@victornoel I would be OK if you invert the order of the arguments in your example: new Assertion<>(
"runs in 5 seconds max",
() -> new TextOf("test"),
new MatchesBefore(
5, TimeUnit.SECONDS.
new TextIs("test")
)
).affirm(); |
The architect of the project has changed; @llorllale/z is not at this role anymore; @paulodamaso/z is the architect now |
@victornoel Job #133 is already on hold |
@llorllale the puzzle #146 is still not solved. |
@llorllale this was merged in #145, can you close the issue? |
@victornoel thanks! |
@paulodamaso/z all |
The job #133 is now out of scope |
@0crat quality good |
@paulodamaso There is no quality review for #133, no performer |
@llorllale the only puzzle #146 is solved here. |
We need a proper OOP alternative for
@Test#timeout
(JUnit 4) andAssertions#assertTimeout
(JUnit 5). In particular, the latter reads backwards (it doesn't assert a timeout - it asserts whether the code executes before the timeout).Proposal:
Where
RunsInMax
is aMatcher<Scalar<T>>
likeThrows
.RunsInMax
fails if the scalar under test throws an error, even before the timeout.I'm open to suggestions for a better name. Maybe
DoesNotExceed(5, TimeUnit.SECONDS)
sounds better?The text was updated successfully, but these errors were encountered: