@@ -42,47 +42,6 @@ public class RemoteWebDriverTest extends JUnit4TestBase {
42
42
private boolean stopClientCalled = false ;
43
43
private boolean quitCalled = false ;
44
44
45
- @ Test
46
- public void testCanCheckServerStatusIndependentlyOfSessions () throws IOException {
47
- if (!(driver instanceof RemoteWebDriver )) {
48
- System .out .println ("Skipping test: driver is not a remote webdriver" );
49
- return ;
50
- }
51
-
52
- RemoteWebDriver remote = (RemoteWebDriver ) driver ;
53
- CommandExecutor executor = remote .getCommandExecutor ();
54
-
55
- if (!(executor instanceof HttpCommandExecutor )) {
56
- System .out .println ("Skipping test: driver is not using a HttpCommandExecutor" );
57
- return ;
58
- }
59
-
60
- HttpCommandExecutor httpExecutor = (HttpCommandExecutor ) executor ;
61
- URL statusUrl = new URL (httpExecutor .getAddressOfRemoteServer () + "/status" );
62
- HttpURLConnection connection = null ;
63
- try {
64
- System .out .println ("Opening connection to " + statusUrl );
65
- connection = (HttpURLConnection ) statusUrl .openConnection ();
66
- connection .connect ();
67
-
68
- assertEquals (200 , connection .getResponseCode ());
69
-
70
- String raw = new String (ByteStreams .toByteArray (connection .getInputStream ()));
71
- JsonObject response = new JsonParser ().parse (raw ).getAsJsonObject ();
72
- assertEquals (raw , ErrorCodes .SUCCESS , response .get ("status" ).getAsInt ());
73
-
74
- JsonObject value = response .get ("value" ).getAsJsonObject ();
75
- assertHasKeys (value , "os" , "build" , "java" );
76
- assertHasKeys (value .get ("os" ).getAsJsonObject (), "name" , "arch" , CapabilityType .VERSION );
77
- assertHasKeys (value .get ("build" ).getAsJsonObject (), CapabilityType .VERSION , "revision" , "time" );
78
- assertHasKeys (value .get ("java" ).getAsJsonObject (), CapabilityType .VERSION );
79
- } finally {
80
- if (connection != null ) {
81
- connection .disconnect ();
82
- }
83
- }
84
- }
85
-
86
45
@ Test
87
46
public void testStopsClientIfStartClientFails () {
88
47
if (!(driver instanceof RemoteWebDriver )) {
0 commit comments