keith-turner commented on a change in pull request #1037: Switch to leader
latch WIP
URL: https://github.com/apache/fluo/pull/1037#discussion_r193124615
##########
File path:
modules/integration/src/test/java/org/apache/fluo/integration/impl/OracleIT.java
##########
@@ -318,14 +322,8 @@ public void threadFailoverTest() throws Exception {
oserver3.close();
}
- private void sleepWhileConnected(OracleServer oserver) throws
InterruptedException {
- while (oserver.isConnected()) {
- Thread.sleep(100);
- }
- }
-
- private void sleepUntilConnected(OracleServer oserver) throws
InterruptedException {
- while (!oserver.isConnected()) {
+ private void sleepWhile(Supplier<Boolean> condition) throws
InterruptedException {
+ while (condition.get()) {
Review comment:
I like that suggestion, much more readable.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services