Skip to content

Commit

Permalink
CURATOR-633: Try to trick javac to not inline the constants' values
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Tzvetanov Grigorov <[email protected]>
  • Loading branch information
martin-g committed Feb 25, 2022
1 parent e1bcc5c commit 7b1737b
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public void stateChanged(CuratorFramework client, ConnectionState newState)

@Test
public void testConnectionStateRecoversFromUnexpectedExpiredConnection() throws Exception {
assumeTrue((Info.MAJOR == 3 && Info.MINOR >= 6) || (Info.MAJOR > 4), "Zookeeper version must be 3.6 or higher");
assumeTrue(() -> (getMajor() == 3 && getMinor() >= 6) || (getMajor() > 4), "Zookeeper version must be 3.6 or higher");
Timing2 timing = new Timing2();
CuratorFramework client = CuratorFrameworkFactory.builder()
.connectString(server.getConnectString())
Expand Down Expand Up @@ -131,4 +131,14 @@ public String getPath() {
CloseableUtils.closeQuietly(client);
}
}

public int getMajor() {
System.err.println("------- MAJOR: " + Info.MAJOR);
return Info.MAJOR;
}

public int getMinor() {
System.err.println("------- MINOR: " + Info.MINOR);
return Info.MINOR;
}
}

0 comments on commit 7b1737b

Please sign in to comment.