You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
since 5.7.0 calling LockAssert.TestHelper.makeAllAssertsPass(false) throws NoSuchElementException.
java.util.NoSuchElementException
at java.base/java.util.LinkedList.removeLast(LinkedList.java:287)
at net.javacrumbs.shedlock.core.LockAssert.endLock(LockAssert.java:46)
at net.javacrumbs.shedlock.core.LockAssert$TestHelper.makeAllAssertsPass(LockAssert.java:81)
Full example (tested with latest 5.10.0):
private final UnitUnderTest unitUnderTest = new UnitUnderTest();
@Test
void shouldThrowIllegalStateExceptionTheTaskIsNotLocked() {
LockAssert.TestHelper.makeAllAssertsPass(false);
final Throwable throwable = catchThrowable(unitUnderTest::run);
then(throwable).isInstanceOf(IllegalStateException.class).hasMessage("The task is not locked.");
}
@Slf4j
static class UnitUnderTest {
public void run() {
LockAssert.assertLocked();
log.info("Do something...");
}
}
With 5.6.0 and before the test was not failing.
Should calling LockAssert.TestHelper.makeAllAssertsPass(false); work regardless if there is an active lock or not?
The text was updated successfully, but these errors were encountered:
Hi,
since
5.7.0
callingLockAssert.TestHelper.makeAllAssertsPass(false)
throwsNoSuchElementException
.Full example (tested with latest
5.10.0
):With
5.6.0
and before the test was not failing.Should calling
LockAssert.TestHelper.makeAllAssertsPass(false);
work regardless if there is an active lock or not?The text was updated successfully, but these errors were encountered: