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/04/30 22:20:55 UTC

[GitHub] [geode] BenjaminPerryRoss commented on a change in pull request #6415: GEODE-8990: Reworked out of date test case

BenjaminPerryRoss commented on a change in pull request #6415:
URL: https://github.com/apache/geode/pull/6415#discussion_r624255405



##########
File path: geode-assembly/src/distributedTest/java/org/apache/geode/session/tests/Jetty9CachingClientServerTest.java
##########
@@ -44,29 +45,37 @@ public ContainerInstall getInstall(IntSupplier portSupplier)
    * request
    */
   @Test
-  public void shouldCacheSessionOnClient()
+  public void shouldUpdateSessionAttributesFromServer()
       throws Exception {
     manager.startAllInactiveContainers();
     await().until(() -> {
       ServerContainer container = manager.getContainer(0);
       return container.getState().isStarted();
     });
     String key = "value_testSessionExpiration";
-    String value = "Foo";
+    String localValue = "bogus";
+    String remoteValue = "Foo";
 
     client.setPort(Integer.parseInt(manager.getContainerPort(0)));
-    Client.Response resp = client.set(key, value);
+    Client.Response resp = client.set(key, localValue);
     assertThat(resp.getResponse()).isEqualTo("");
     assertThat(resp.getSessionCookie()).isNotEqualTo("");
 
+    // Make sure the client correctly set its original cached value
+    resp = client.get(key);
+    assertThat(resp.getResponse()).isEqualTo(localValue);
+
     serverVM.invoke("set bogus session key", () -> {

Review comment:
       Good idea! I've changed it to 'remote session key' 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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org