Skip to content

Commit

Permalink
spA
Browse files Browse the repository at this point in the history
  • Loading branch information
sabbey37 authored and BenjaminPerryRoss committed Apr 9, 2021
1 parent 948f0ce commit 5d1803a
Showing 1 changed file with 14 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,8 @@ public void containersShouldReplicateCookies() throws IOException, URISyntaxExce

client.setPort(Integer.parseInt(manager.getContainerPort(0)));
Client.Response resp = client.get(null);
GeodeAwaitility.await().untilAsserted(() -> getKeyValueDataOnAllClients(null, "", resp.getSessionCookie()));
GeodeAwaitility.await()
.untilAsserted(() -> getKeyValueDataOnAllClients(null, "", resp.getSessionCookie()));
}

/**
Expand All @@ -187,7 +188,8 @@ public void containersShouldHavePersistentSessionData() throws IOException, URIS

client.setPort(Integer.parseInt(manager.getContainerPort(0)));
Client.Response resp = client.set(key, value);
GeodeAwaitility.await().untilAsserted(() -> getKeyValueDataOnAllClients(key, value, resp.getSessionCookie()));
GeodeAwaitility.await()
.untilAsserted(() -> getKeyValueDataOnAllClients(key, value, resp.getSessionCookie()));
}

/**
Expand All @@ -208,7 +210,8 @@ public void failureShouldStillAllowOtherContainersDataAccess()
manager.stopContainer(0);
manager.removeContainer(0);

GeodeAwaitility.await().untilAsserted(() -> getKeyValueDataOnAllClients(key, value, resp.getSessionCookie()));
GeodeAwaitility.await()
.untilAsserted(() -> getKeyValueDataOnAllClients(key, value, resp.getSessionCookie()));

checkLogs();
}
Expand Down Expand Up @@ -251,7 +254,8 @@ public void containersShouldExpireInSetTimeframe()

client.setPort(Integer.parseInt(manager.getContainerPort(0)));
Client.Response resp = client.set(key, value);
GeodeAwaitility.await().untilAsserted(() -> getKeyValueDataOnAllClients(key, value, resp.getSessionCookie()));
GeodeAwaitility.await()
.untilAsserted(() -> getKeyValueDataOnAllClients(key, value, resp.getSessionCookie()));
client.setMaxInactive(1); // max inactive time is 1 second. Lets wait a second.
Thread.sleep(2000);

Expand Down Expand Up @@ -353,7 +357,8 @@ public void containersShouldShareDataRemovals() throws IOException, URISyntaxExc

client.setPort(Integer.parseInt(manager.getContainerPort(0)));
Client.Response resp = client.set(key, value);
GeodeAwaitility.await().untilAsserted(() -> getKeyValueDataOnAllClients(key, value, resp.getSessionCookie()));
GeodeAwaitility.await()
.untilAsserted(() -> getKeyValueDataOnAllClients(key, value, resp.getSessionCookie()));
client.setPort(Integer.parseInt(manager.getContainerPort(0)));
client.remove(key);

Expand All @@ -376,7 +381,8 @@ public void newContainersShouldShareDataAccess() throws Exception {
client.setPort(Integer.parseInt(manager.getContainerPort(0)));
Client.Response resp = client.set(key, value);

GeodeAwaitility.await().untilAsserted(() -> getKeyValueDataOnAllClients(key, value, resp.getSessionCookie()));
GeodeAwaitility.await()
.untilAsserted(() -> getKeyValueDataOnAllClients(key, value, resp.getSessionCookie()));
int numContainers = manager.numContainers();
// Add and start new container
manager.addContainer(install);
Expand All @@ -385,7 +391,8 @@ public void newContainersShouldShareDataAccess() throws Exception {
manager.startAllInactiveContainers();
// Check that a container was added
assertEquals(numContainers + 1, manager.numContainers());
GeodeAwaitility.await().untilAsserted(() -> getKeyValueDataOnAllClients(key, value, resp.getSessionCookie()));
GeodeAwaitility.await()
.untilAsserted(() -> getKeyValueDataOnAllClients(key, value, resp.getSessionCookie()));
}

@Test
Expand Down

0 comments on commit 5d1803a

Please sign in to comment.