Skip to content

Commit ee4e55c

Browse files
committed
Deleting deprecated class
1 parent 33cf641 commit ee4e55c

File tree

3 files changed

+8
-281
lines changed

3 files changed

+8
-281
lines changed

java/server/src/org/openqa/grid/internal/Registry.java

Lines changed: 0 additions & 258 deletions
This file was deleted.

java/server/test/org/openqa/grid/e2e/misc/WebDriverPriorityDemo.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
import org.openqa.grid.e2e.utils.GridTestHelper;
2727
import org.openqa.grid.e2e.utils.RegistryTestHelper;
2828
import org.openqa.grid.internal.GridRegistry;
29-
import org.openqa.grid.internal.Registry;
3029
import org.openqa.grid.internal.listeners.Prioritizer;
3130
import org.openqa.grid.internal.utils.SelfRegisteringRemote;
3231
import org.openqa.grid.internal.utils.configuration.GridHubConfiguration;

java/server/test/org/openqa/grid/internal/RegistryTest.java

Lines changed: 8 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919

2020
import static org.junit.Assert.assertEquals;
2121
import static org.junit.Assert.assertTrue;
22-
import static org.junit.Assert.assertNull;
2322

2423
import org.junit.Before;
2524
import org.junit.Test;
@@ -28,7 +27,6 @@
2827
import org.openqa.grid.common.exception.GridException;
2928
import org.openqa.grid.internal.listeners.RegistrationListener;
3029
import org.openqa.grid.internal.mock.GridHelper;
31-
import org.openqa.grid.internal.utils.configuration.GridHubConfiguration;
3230
import org.openqa.grid.internal.utils.configuration.GridNodeConfiguration;
3331
import org.openqa.grid.web.servlet.handler.RequestHandler;
3432
import org.openqa.selenium.remote.CapabilityType;
@@ -44,7 +42,6 @@ public class RegistryTest {
4442

4543
private static final int TOTAL_THREADS = 100;
4644

47-
4845
@Test
4946
public void addProxy() throws Exception {
5047
GridRegistry registry = DefaultGridRegistry.newInstance();
@@ -170,12 +167,10 @@ public void registerAtTheSameTime() throws InterruptedException {
170167

171168
try {
172169
for (int i = 0; i < TOTAL_THREADS; i++) {
173-
new Thread(new Runnable() { // Thread safety reviewed
174-
175-
public void run() {
176-
registry.add(new BaseRemoteProxy(req, registry));
177-
latch.countDown();
178-
}
170+
// Thread safety reviewed
171+
new Thread(() -> {
172+
registry.add(new BaseRemoteProxy(req, registry));
173+
latch.countDown();
179174
}).start();
180175
}
181176

@@ -220,12 +215,10 @@ public void registerAtTheSameTimeWithListener() throws InterruptedException {
220215

221216
try {
222217
for (int i = 0; i < TOTAL_THREADS; i++) {
223-
new Thread(new Runnable() { // Thread safety reviewed
224-
225-
public void run() {
226-
registry.add(new MyRemoteProxy(req, registry));
227-
counter.incrementAndGet();
228-
}
218+
// Thread safety reviewed
219+
new Thread(() -> {
220+
registry.add(new MyRemoteProxy(req, registry));
221+
counter.incrementAndGet();
229222
}).start();
230223
}
231224
while (counter.get() != TOTAL_THREADS) {
@@ -237,11 +230,4 @@ public void run() {
237230
registry.stop();
238231
}
239232
}
240-
241-
@Test
242-
public void testLegacyNewInstanceCanReceiveNullHub() {
243-
GridRegistry registry = Registry.newInstance(null, new GridHubConfiguration());
244-
assertNull(registry.getHub());
245-
}
246-
247233
}

0 commit comments

Comments
 (0)