Skip to content

Commit 7fa050f

Browse files
committed
java: Deleting a test for status command because it is deprecated
1 parent 2976ad5 commit 7fa050f

File tree

1 file changed

+0
-41
lines changed

1 file changed

+0
-41
lines changed

Diff for: java/server/test/org/openqa/selenium/remote/server/RemoteWebDriverTest.java

-41
Original file line numberDiff line numberDiff line change
@@ -42,47 +42,6 @@ public class RemoteWebDriverTest extends JUnit4TestBase {
4242
private boolean stopClientCalled = false;
4343
private boolean quitCalled = false;
4444

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-
8645
@Test
8746
public void testStopsClientIfStartClientFails() {
8847
if (!(driver instanceof RemoteWebDriver)) {

0 commit comments

Comments
 (0)