File tree Expand file tree Collapse file tree 1 file changed +12
-5
lines changed
java/test/org/openqa/selenium/grid/node Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change 1717
1818package org .openqa .selenium .grid .node ;
1919
20- import static java .net .HttpURLConnection .HTTP_INTERNAL_ERROR ;
20+ import static java .net .HttpURLConnection .HTTP_NOT_FOUND ;
2121import static org .junit .jupiter .api .Assertions .assertEquals ;
2222import static org .mockito .Mockito .*;
2323import static org .openqa .selenium .remote .http .Contents .asJson ;
2424
25- import com . google . common . collect . ImmutableMap ;
25+ import java . util . Map ;
2626import java .util .UUID ;
2727import org .junit .jupiter .api .BeforeEach ;
2828import org .junit .jupiter .api .Test ;
@@ -69,11 +69,18 @@ void testExecuteWithInvalidSessionOwner() {
6969 HttpResponse actualResponse = command .execute (mockRequest );
7070 HttpResponse expectResponse =
7171 new HttpResponse ()
72- .setStatus (HTTP_INTERNAL_ERROR )
72+ .setStatus (HTTP_NOT_FOUND )
7373 .setContent (
7474 asJson (
75- ImmutableMap .of (
76- "error" , String .format ("Session not found in node %s" , mockNode .getId ()))));
75+ Map .of (
76+ "value" ,
77+ Map .of (
78+ "error" ,
79+ "invalid session id" ,
80+ "message" ,
81+ "Cannot find session with id: " + sessionId ,
82+ "stacktrace" ,
83+ "" ))));
7784 assertEquals (expectResponse .getStatus (), actualResponse .getStatus ());
7885 assertEquals (expectResponse .getContentEncoding (), actualResponse .getContentEncoding ());
7986 }
You can’t perform that action at this time.
0 commit comments