jinmeiliao commented on a change in pull request #7063:
URL: https://github.com/apache/geode/pull/7063#discussion_r741510106
##########
File path:
geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/CacheClientProxyTest.java
##########
@@ -75,32 +79,41 @@ public void before() throws Exception {
statsFactory = mock(StatisticsFactory.class);
proxyStatsFactory = mock(CacheClientProxyStatsFactory.class);
dispatcherFactory = mock(MessageDispatcherFactory.class);
+ clientUserAuths = mock(ClientUserAuths.class);
+
+ proxyWithSingleUser =
+ new CacheClientProxy(cache, notifier, socket, id, true, (byte) 1,
version, 1L, true,
+ securityService, subject, clock, statsFactory, proxyStatsFactory,
dispatcherFactory,
+ clientUserAuths);
+
+ proxyWithMultiUser =
+ new CacheClientProxy(cache, notifier, socket, id, true, (byte) 1,
version, 1L, true,
+ securityService, null, clock, statsFactory, proxyStatsFactory,
dispatcherFactory,
+ clientUserAuths);
}
@Test
public void noExceptionWhenGettingSubjectForCQWhenSubjectIsNotNull() {
- proxy = spy(new CacheClientProxy(cache, notifier, socket, id, true, (byte)
1, version, 1L, true,
- securityService, subject, clock, statsFactory, proxyStatsFactory,
dispatcherFactory));
- proxy.getSubject("cq");
+ proxyWithSingleUser.getSubject("cq");
}
@Test
public void noExceptionWhenGettingSubjectForCQWhenSubjectIsNull() {
- proxy = spy(new CacheClientProxy(cache, notifier, socket, id, true, (byte)
1, version, 1L, true,
- securityService, null, clock, statsFactory, proxyStatsFactory,
dispatcherFactory));
- proxy.getSubject("cq");
+ proxyWithMultiUser.getSubject("cq");
}
@Test
public void deliverMessageWhenSubjectIsNotNull() {
when(proxyStatsFactory.create(any(), any(), any()))
.thenReturn(mock(CacheClientProxyStats.class));
Review comment:
done
--
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]