jinmeiliao commented on a change in pull request #7357:
URL: https://github.com/apache/geode/pull/7357#discussion_r805086402



##########
File path: 
geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/ServerConnectionTest.java
##########
@@ -276,4 +278,26 @@ public void 
doNormalMessageShouldNotProcessMessageWhenTerminated() {
     assertThat(spy.getProcessMessages()).isFalse();
     verify(spy, never()).resumeThreadMonitoring();
   }
+
+  @Test
+  public void cleanClientAuthShouldNullIt() {
+    ClientUserAuths clientUserAuths = mock(ClientUserAuths.class);
+    ServerConnection spy = spy(serverConnection);
+    spy.setClientUserAuths(clientUserAuths);
+    spy.cleanClientAuths();
+    assertThat(spy.getClientUserAuths()).isNull();
+  }
+
+  @Test
+  public void handleTerminationShouldNotNullClientAuths() {
+    when(acceptor.getClientHealthMonitor()).thenReturn(clientHealthMonitor);

Review comment:
        I could add a call `putSubject` behind it to assert no NPE happens in 
that call, or I could just assert `clientUserAuths` is not null (as the test 
does it).




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to