changed name of main test class
This commit is contained in:
parent
6df9f268ef
commit
6d45e7a846
|
@ -22,7 +22,7 @@ import dorkbox.network.util.InitializationException;
|
|||
import dorkbox.network.util.entropy.Entropy;
|
||||
import dorkbox.network.util.entropy.SimpleEntropy;
|
||||
|
||||
public abstract class DorknetTestCase {
|
||||
public abstract class BaseTest {
|
||||
|
||||
static {
|
||||
// we want our entropy generation to be simple (ie, no user interaction to generate)
|
||||
|
@ -42,7 +42,7 @@ public abstract class DorknetTestCase {
|
|||
private volatile Timer timer;
|
||||
boolean fail_check;
|
||||
|
||||
public DorknetTestCase () {
|
||||
public BaseTest () {
|
||||
System.out.println("---- " + getClass().getSimpleName());
|
||||
|
||||
// assume SLF4J is bound to logback in the current environment
|
||||
|
@ -107,14 +107,14 @@ public abstract class DorknetTestCase {
|
|||
this.timer.schedule(new TimerTask() {
|
||||
@Override
|
||||
public void run () {
|
||||
synchronized (DorknetTestCase.this.endPoints) {
|
||||
for (EndPoint endPoint : DorknetTestCase.this.endPoints) {
|
||||
synchronized (BaseTest.this.endPoints) {
|
||||
for (EndPoint endPoint : BaseTest.this.endPoints) {
|
||||
endPoint.stop();
|
||||
}
|
||||
DorknetTestCase.this.endPoints.clear();
|
||||
DorknetTestCase.this.timer.cancel();
|
||||
DorknetTestCase.this.timer.purge();
|
||||
DorknetTestCase.this.timer = null;
|
||||
BaseTest.this.endPoints.clear();
|
||||
BaseTest.this.timer.cancel();
|
||||
BaseTest.this.timer.purge();
|
||||
BaseTest.this.timer = null;
|
||||
}
|
||||
}
|
||||
}, stopAfterMillis);
|
||||
|
@ -142,7 +142,7 @@ public abstract class DorknetTestCase {
|
|||
@Override
|
||||
public void run () {
|
||||
stopEndPoints();
|
||||
DorknetTestCase.this.fail_check = true;
|
||||
BaseTest.this.fail_check = true;
|
||||
}
|
||||
};
|
||||
this.timer.schedule(failTask, stopAfterMillis+3000L);
|
|
@ -16,7 +16,7 @@ import dorkbox.network.util.InitializationException;
|
|||
import dorkbox.network.util.SecurityException;
|
||||
import dorkbox.network.util.SerializationManager;
|
||||
|
||||
public class BufferTest extends DorknetTestCase {
|
||||
public class BufferTest extends BaseTest {
|
||||
private static final int OBJ_SIZE = 1024 * 10;
|
||||
|
||||
private volatile int finalCheckAmount = 0;
|
||||
|
|
|
@ -15,7 +15,7 @@ import dorkbox.network.util.InitializationException;
|
|||
import dorkbox.network.util.SecurityException;
|
||||
import dorkbox.network.util.SerializationManager;
|
||||
|
||||
public class ClientSendTest extends DorknetTestCase {
|
||||
public class ClientSendTest extends BaseTest {
|
||||
|
||||
private AtomicBoolean checkPassed = new AtomicBoolean(false);
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ import dorkbox.network.connection.Listener;
|
|||
import dorkbox.network.util.InitializationException;
|
||||
import dorkbox.network.util.SecurityException;
|
||||
|
||||
public class ConnectionTest extends DorknetTestCase {
|
||||
public class ConnectionTest extends BaseTest {
|
||||
|
||||
@Test
|
||||
public void connectLocal() throws IOException, InitializationException, SecurityException {
|
||||
|
|
|
@ -13,7 +13,7 @@ import dorkbox.network.connection.Listener;
|
|||
import dorkbox.network.util.InitializationException;
|
||||
import dorkbox.network.util.SecurityException;
|
||||
|
||||
public class DiscoverHostTest extends DorknetTestCase {
|
||||
public class DiscoverHostTest extends BaseTest {
|
||||
volatile boolean connected = false;
|
||||
|
||||
@Test
|
||||
|
|
|
@ -21,7 +21,7 @@ import dorkbox.network.util.SecurityException;
|
|||
import dorkbox.network.util.SerializationManager;
|
||||
|
||||
@SuppressWarnings({"rawtypes"})
|
||||
public class IdleTest extends DorknetTestCase {
|
||||
public class IdleTest extends BaseTest {
|
||||
private volatile boolean success = false;
|
||||
|
||||
enum ConnectionType {
|
||||
|
|
|
@ -18,7 +18,7 @@ import dorkbox.network.connection.Listener;
|
|||
import dorkbox.network.util.InitializationException;
|
||||
import dorkbox.network.util.SecurityException;
|
||||
|
||||
public class ListenerTest extends DorknetTestCase {
|
||||
public class ListenerTest extends BaseTest {
|
||||
|
||||
private final String origString = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"; // lots of a's to encourage compression
|
||||
private final int limit = 20;
|
||||
|
|
|
@ -13,7 +13,7 @@ import dorkbox.network.connection.Listener;
|
|||
import dorkbox.network.util.InitializationException;
|
||||
import dorkbox.network.util.SecurityException;
|
||||
|
||||
public class MultipleServerTest extends DorknetTestCase {
|
||||
public class MultipleServerTest extends BaseTest {
|
||||
AtomicInteger received = new AtomicInteger();
|
||||
|
||||
@Test
|
||||
|
|
|
@ -18,7 +18,7 @@ import dorkbox.network.connection.Listener;
|
|||
import dorkbox.network.util.InitializationException;
|
||||
import dorkbox.network.util.SecurityException;
|
||||
|
||||
public class MultipleThreadTest extends DorknetTestCase {
|
||||
public class MultipleThreadTest extends BaseTest {
|
||||
AtomicInteger sent = new AtomicInteger(0);
|
||||
AtomicInteger totalClientCounter = new AtomicInteger(1);
|
||||
AtomicInteger receivedServer = new AtomicInteger(1);
|
||||
|
|
|
@ -15,7 +15,7 @@ import dorkbox.network.util.InitializationException;
|
|||
import dorkbox.network.util.SecurityException;
|
||||
import dorkbox.network.util.SerializationManager;
|
||||
|
||||
public class PingPongLocalTest extends DorknetTestCase {
|
||||
public class PingPongLocalTest extends BaseTest {
|
||||
private volatile String fail;
|
||||
int tries = 10000;
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ import dorkbox.network.util.InitializationException;
|
|||
import dorkbox.network.util.SecurityException;
|
||||
import dorkbox.network.util.SerializationManager;
|
||||
|
||||
public class PingPongTest extends DorknetTestCase {
|
||||
public class PingPongTest extends BaseTest {
|
||||
private volatile String fail;
|
||||
|
||||
int tries = 1000;
|
||||
|
|
|
@ -15,7 +15,7 @@ import dorkbox.network.util.InitializationException;
|
|||
import dorkbox.network.util.SecurityException;
|
||||
|
||||
|
||||
public class PingTest extends DorknetTestCase {
|
||||
public class PingTest extends BaseTest {
|
||||
|
||||
private volatile int response = -1;
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ import dorkbox.network.connection.Listener;
|
|||
import dorkbox.network.util.InitializationException;
|
||||
import dorkbox.network.util.SecurityException;
|
||||
|
||||
public class ReconnectTest extends DorknetTestCase {
|
||||
public class ReconnectTest extends BaseTest {
|
||||
|
||||
@Test
|
||||
public void reconnect() throws IOException, InitializationException, SecurityException {
|
||||
|
|
|
@ -14,7 +14,7 @@ import dorkbox.network.util.store.SettingsStore;
|
|||
|
||||
|
||||
|
||||
public class ReflectionSecurityTest extends DorknetTestCase {
|
||||
public class ReflectionSecurityTest extends BaseTest {
|
||||
private static boolean RUN_TEST = false;
|
||||
|
||||
@Test
|
||||
|
|
|
@ -14,7 +14,7 @@ import dorkbox.network.connection.Listener;
|
|||
import dorkbox.network.util.InitializationException;
|
||||
import dorkbox.network.util.SecurityException;
|
||||
|
||||
public class ReuseTest extends DorknetTestCase {
|
||||
public class ReuseTest extends BaseTest {
|
||||
AtomicInteger serverCount;
|
||||
AtomicInteger clientCount;
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ import dorkbox.network.connection.Listener;
|
|||
import dorkbox.network.util.InitializationException;
|
||||
import dorkbox.network.util.SecurityException;
|
||||
|
||||
public class UnregisteredClassTest extends DorknetTestCase {
|
||||
public class UnregisteredClassTest extends BaseTest {
|
||||
private String fail;
|
||||
private int tries = 10000;
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ import org.junit.Test;
|
|||
|
||||
import dorkbox.network.Client;
|
||||
import dorkbox.network.ConnectionOptions;
|
||||
import dorkbox.network.DorknetTestCase;
|
||||
import dorkbox.network.BaseTest;
|
||||
import dorkbox.network.Server;
|
||||
import dorkbox.network.connection.Connection;
|
||||
import dorkbox.network.connection.Listener;
|
||||
|
@ -17,7 +17,7 @@ import dorkbox.network.util.InitializationException;
|
|||
import dorkbox.network.util.SecurityException;
|
||||
import dorkbox.network.util.SerializationManager;
|
||||
|
||||
public class RmiSendObjectTest extends DorknetTestCase {
|
||||
public class RmiSendObjectTest extends BaseTest {
|
||||
private RmiBridge serverRMI;
|
||||
|
||||
/**
|
||||
|
|
|
@ -11,7 +11,7 @@ import org.junit.Test;
|
|||
|
||||
import dorkbox.network.Client;
|
||||
import dorkbox.network.ConnectionOptions;
|
||||
import dorkbox.network.DorknetTestCase;
|
||||
import dorkbox.network.BaseTest;
|
||||
import dorkbox.network.Server;
|
||||
import dorkbox.network.connection.Connection;
|
||||
import dorkbox.network.connection.Listener;
|
||||
|
@ -19,7 +19,7 @@ import dorkbox.network.util.InitializationException;
|
|||
import dorkbox.network.util.SecurityException;
|
||||
import dorkbox.network.util.SerializationManager;
|
||||
|
||||
public class RmiTest extends DorknetTestCase {
|
||||
public class RmiTest extends BaseTest {
|
||||
|
||||
private static final int CLIENT_ID = 4321;
|
||||
private static final int SERVER_ID = 1234;
|
||||
|
|
Loading…
Reference in New Issue