File tree Expand file tree Collapse file tree
agent-proxy/src/test/java/io/sentrius/sso/service
dataplane/src/test/java/io/sentrius/sso/core/services Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -72,10 +72,6 @@ void testRegisterAndUnregisterSession() {
7272 void testGetActiveAgentSessionDurations () throws InterruptedException {
7373 // Given
7474 String sessionId = "active-session-1" ;
75- when (webSocketSession .getId ()).thenReturn (sessionId );
76- when (webSocketSession .isOpen ()).thenReturn (true );
77- when (webSocketSession .getHandshakeInfo ()).thenReturn (handshakeInfo );
78- when (handshakeInfo .getRemoteAddress ()).thenReturn (new InetSocketAddress ("127.0.0.1" , 8080 ));
7975
8076 // When
8177 sessionManager .register (sessionId , webSocketSession );
Original file line number Diff line number Diff line change 1919import java .time .LocalDateTime ;
2020import java .util .ArrayList ;
2121import java .util .Arrays ;
22+ import java .util .Collections ;
2223import java .util .HashMap ;
2324import java .util .List ;
2425import java .util .Map ;
@@ -61,13 +62,13 @@ void testGetGraphDataWithoutAgentSessions() {
6162 ));
6263
6364 when (terminalLogRepository .findMinAndMaxLogTmBySessionLogId (1L ))
64- .thenReturn (Arrays . asList (new Object []{
65+ .thenReturn (Collections . singletonList (new Object []{
6566 Timestamp .valueOf (LocalDateTime .now ().minusMinutes (10 )),
6667 Timestamp .valueOf (LocalDateTime .now ().minusMinutes (5 ))
6768 }));
6869
6970 when (terminalLogRepository .findMinAndMaxLogTmBySessionLogId (2L ))
70- .thenReturn (Arrays . asList (new Object []{
71+ .thenReturn (Collections . singletonList (new Object []{
7172 Timestamp .valueOf (LocalDateTime .now ().minusMinutes (20 )),
7273 Timestamp .valueOf (LocalDateTime .now ())
7374 }));
You can’t perform that action at this time.
0 commit comments