You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@geode.apache.org by GitBox <gi...@apache.org> on 2021/10/06 23:40:14 UTC
[GitHub] [geode] demery-pivotal opened a new pull request #6951: GEODE-9536: Make PingOp test more patient
demery-pivotal opened a new pull request #6951:
URL: https://github.com/apache/geode/pull/6951
PROBLEM
On some versions of Windows (such as the version we use in CI), the
granularity of `System.currentTimeMillis()` is ~15ms.
`PingOpDistributedTest.regularPingFlow()` executes two pings and
asserts that the resulting heartbeat timestamp to has increased from one
ping to the next.
The test's two pings often occur so rapidly that the heartbeat
timestamps appear to be the same, causing the assertion to fail.
SOLUTION
Change the test to use `await()` to repeat the pings until the heartbeat
timestamp increases.
NOTE
This prepares for an upcoming PR to run all distributed tests on
Windows.
--
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: notifications-unsubscribe@geode.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [geode] demery-pivotal commented on a change in pull request #6951: GEODE-9536: Make PingOp test more patient
Posted by GitBox <gi...@apache.org>.
demery-pivotal commented on a change in pull request #6951:
URL: https://github.com/apache/geode/pull/6951#discussion_r725162576
##########
File path: geode-core/src/distributedTest/java/org/apache/geode/internal/cache/tier/sockets/PingOpDistributedTest.java
##########
@@ -133,11 +133,12 @@ public void regularPingFlow() {
client.invoke(() -> executePing(poolName, server1Port, distributedMember1));
Long firstHeartbeat = server1.invoke(this::getSingleHeartBeat);
- client.invoke(() -> executePing(poolName, server1Port, distributedMember1));
- Long secondHeartbeat = server1.invoke(this::getSingleHeartBeat);
-
- assertThat(secondHeartbeat).isGreaterThan(firstHeartbeat);
+ GeodeAwaitility.await().untilAsserted(() -> {
Review comment:
Done. Note that I couldn't use an assertion for that, because awaitility would catch and ignore the `AssertionError`. I explicitly threw an `Error` instead.
--
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: notifications-unsubscribe@geode.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [geode] albertogpz commented on a change in pull request #6951: GEODE-9536: Make PingOp test more patient
Posted by GitBox <gi...@apache.org>.
albertogpz commented on a change in pull request #6951:
URL: https://github.com/apache/geode/pull/6951#discussion_r724733039
##########
File path: geode-core/src/distributedTest/java/org/apache/geode/internal/cache/tier/sockets/PingOpDistributedTest.java
##########
@@ -133,11 +133,12 @@ public void regularPingFlow() {
client.invoke(() -> executePing(poolName, server1Port, distributedMember1));
Long firstHeartbeat = server1.invoke(this::getSingleHeartBeat);
- client.invoke(() -> executePing(poolName, server1Port, distributedMember1));
- Long secondHeartbeat = server1.invoke(this::getSingleHeartBeat);
-
- assertThat(secondHeartbeat).isGreaterThan(firstHeartbeat);
+ GeodeAwaitility.await().untilAsserted(() -> {
Review comment:
I would also check here that the subsequent heartbeat is never smaller than the first one.
--
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: notifications-unsubscribe@geode.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [geode] demery-pivotal merged pull request #6951: GEODE-9536: Make PingOp test more patient
Posted by GitBox <gi...@apache.org>.
demery-pivotal merged pull request #6951:
URL: https://github.com/apache/geode/pull/6951
--
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: notifications-unsubscribe@geode.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org