m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
path: root/src/test/java/pl
diff options
context:
space:
mode:
authorMagdalena GrodziƄska <mag.grodzinska@gmail.com>2020-01-12 15:27:11 +0100
committerGitHub <noreply@github.com>2020-01-12 15:27:11 +0100
commitd88caa2d3fdb3cc5d17a4367583e8ab385ead3b6 (patch)
tree85cccc543ba5531f88f0d9c2216dbd9136ae2ab6 /src/test/java/pl
parentf2841b8bfe142a2d6643cfe9bb9aca99cb8f6d23 (diff)
parent7e079f18eb919c0c64b40321e2860420f866a60a (diff)
Merge pull request #111 from m-chrzan/optimize_tests_lol
Reduce sleeps
Diffstat (limited to 'src/test/java/pl')
-rw-r--r--src/test/java/pl/edu/mimuw/cloudatlas/agent/AgentIntegrationTest.java4
-rw-r--r--src/test/java/pl/edu/mimuw/cloudatlas/agent/SchedulerTest.java6
-rw-r--r--src/test/java/pl/edu/mimuw/cloudatlas/agent/UDUPTest.java12
3 files changed, 11 insertions, 11 deletions
diff --git a/src/test/java/pl/edu/mimuw/cloudatlas/agent/AgentIntegrationTest.java b/src/test/java/pl/edu/mimuw/cloudatlas/agent/AgentIntegrationTest.java
index e2c12d6..9028026 100644
--- a/src/test/java/pl/edu/mimuw/cloudatlas/agent/AgentIntegrationTest.java
+++ b/src/test/java/pl/edu/mimuw/cloudatlas/agent/AgentIntegrationTest.java
@@ -48,9 +48,9 @@ public class AgentIntegrationTest {
@BeforeClass
public static void bindApi() throws Exception {
registryProcess = Runtime.getRuntime().exec("./scripts/registry");
- Thread.sleep(10000);
+ Thread.sleep(5000);
agentProcess = Runtime.getRuntime().exec("./gradlew runAgent -Dhostname=localhost -DfreshnessPeriod=10000000 -DqueryPeriod=100");
- Thread.sleep(10000);
+ Thread.sleep(5000);
registry = LocateRegistry.getRegistry("localhost");
api = (Api) registry.lookup("Api");
diff --git a/src/test/java/pl/edu/mimuw/cloudatlas/agent/SchedulerTest.java b/src/test/java/pl/edu/mimuw/cloudatlas/agent/SchedulerTest.java
index 4a9eb87..99051ff 100644
--- a/src/test/java/pl/edu/mimuw/cloudatlas/agent/SchedulerTest.java
+++ b/src/test/java/pl/edu/mimuw/cloudatlas/agent/SchedulerTest.java
@@ -60,7 +60,7 @@ public class SchedulerTest {
}
}));
- Thread.sleep(1000);
+ Thread.sleep(300);
}
@Test
@@ -92,7 +92,7 @@ public class SchedulerTest {
}));
- Thread.sleep(1000);
+ Thread.sleep(300);
}
@Test
@@ -129,6 +129,6 @@ public class SchedulerTest {
}
}));
- Thread.sleep(1000);
+ Thread.sleep(300);
}
}
diff --git a/src/test/java/pl/edu/mimuw/cloudatlas/agent/UDUPTest.java b/src/test/java/pl/edu/mimuw/cloudatlas/agent/UDUPTest.java
index ac2c587..f731706 100644
--- a/src/test/java/pl/edu/mimuw/cloudatlas/agent/UDUPTest.java
+++ b/src/test/java/pl/edu/mimuw/cloudatlas/agent/UDUPTest.java
@@ -30,7 +30,7 @@ public class UDUPTest {
UDUPServer server2 = null;
UDUPMessage msg1 = null;
boolean testSuccess = true;
- int timeout = 5000;
+ int timeout = 500;
try {
System.out.println("Starting udp1");
@@ -72,7 +72,7 @@ public class UDUPTest {
udpThread2.start();
try {
- Thread.sleep(500);
+ Thread.sleep(100);
if (udp1 == null | udp2 == null) {
testSuccess = false;
} else {
@@ -102,7 +102,7 @@ public class UDUPTest {
UDUPServer server2 = null;
UDUPMessage msg1 = null;
boolean testSuccess = true;
- int timeout = 3000;
+ int timeout = 1000;
try {
System.out.println("Starting udp1");
@@ -144,7 +144,7 @@ public class UDUPTest {
udpThread2.start();
try {
- Thread.sleep(500);
+ Thread.sleep(100);
if (udp1 == null | udp2 == null) {
testSuccess = false;
} else {
@@ -177,7 +177,7 @@ public class UDUPTest {
UDUPMessage msg2 = null;
UDUPMessage msg3 = null;
boolean testSuccess = true;
- int timeout = 3000;
+ int timeout = 1000;
try {
System.out.println("Starting udp1");
@@ -231,7 +231,7 @@ public class UDUPTest {
udpThread2.start();
try {
- Thread.sleep(500);
+ Thread.sleep(100);
if (udp1 == null | udp2 == null) {
testSuccess = false;
} else {