ibessonov commented on code in PR #4233:
URL: https://github.com/apache/ignite-3/pull/4233#discussion_r1719452123
##########
modules/core/src/test/java/org/apache/ignite/internal/util/VersatileReadWriteLockTest.java:
##########
@@ -277,14 +270,14 @@ void shouldNotAllowInterleavingHoldingReadAndWriteLocks()
{
}
@Test
- void readLockReleasedLessTimesThanAcquiredShouldStillBeTaken() throws
Exception {
+ void readLockReleasedLessTimesThanAcquiredShouldStillBeTaken() {
lock.readLock();
- Future<?> future = executor.submit(() -> {
+ CompletableFuture<?> future = runAsync(() -> {
lock.readLock();
lock.readUnlock();
- });
- future.get(10, SECONDS);
+ }, executor);
+ assertThat(future, willCompleteSuccessfully());
Review Comment:
`runWithTimeout` does the same, is that correct? That's why I don't like
on-liner methods, you just forget that you could use them
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]