adelapena commented on a change in pull request #1342:
URL: https://github.com/apache/cassandra/pull/1342#discussion_r758638114
##########
File path: test/unit/org/apache/cassandra/utils/RecomputingSupplierTest.java
##########
@@ -93,31 +89,40 @@ public void recomputingSupplierTest() throws Throwable
lastSeen.accumulateAndGet(v, Math::max);
Assert.assertTrue(String.format("Seen %d out of
order. Last seen value %d", v, seenBeforeGet),
v >= seenBeforeGet);
-
}
-
}
catch (Throwable e)
{
thrown.set(e);
- latch.countDown();
}
}
});
}
- latch.await(10, TimeUnit.SECONDS);
-
+ Util.spinAssertEquals(true, () -> {return counter.get() > 1;}, 11);
Review comment:
> nit: I'd probably take intelij's suggestion and replace the second
argument with () -> counter.get() > 1 which is a little less verbose.
I'd also go with the concise format, `() -> counter.get() > 1`. I haven't
seen any rule about this in our code style, so I guess that the IDE warning
depends on random defaults not covered by the project's code style. The
`eclipse-warnings` Ant target seems to accept both formats. Anyway, I haven't
found anything on the codebase containing the pattern `) -> {return`, while
there are numerous usages of the compact format. So, we can probably assume
that that's the untold convention.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]