Commit 36007a40 authored by Phillip Webb's avatar Phillip Webb

Fix failing developer tools tests

Tweak timings for some tests to fix failures that only occur on Linux
machines.

See gh-3082
parent 247d2d6a
......@@ -91,10 +91,10 @@ public class RestarterTests {
};
thread.start();
Thread.sleep(1600);
Thread.sleep(2600);
String output = this.out.toString();
assertThat(StringUtils.countOccurrencesOf(output, "Tick 0"), greaterThan(2));
assertThat(StringUtils.countOccurrencesOf(output, "Tick 1"), greaterThan(2));
assertThat(StringUtils.countOccurrencesOf(output, "Tick 0"), greaterThan(1));
assertThat(StringUtils.countOccurrencesOf(output, "Tick 1"), greaterThan(1));
}
@Test
......@@ -199,12 +199,12 @@ public class RestarterTests {
private static volatile boolean quit = false;
@Scheduled(fixedDelay = 100)
@Scheduled(fixedDelay = 200)
public void tickBean() {
System.out.println("Tick " + this.count++ + " " + Thread.currentThread());
}
@Scheduled(initialDelay = 350, fixedDelay = 350)
@Scheduled(initialDelay = 500, fixedDelay = 500)
public void restart() {
System.out.println("Restart " + Thread.currentThread());
if (!SampleApplication.quit) {
......
......@@ -84,6 +84,7 @@ public class TunnelClientTests {
client.start();
SocketChannel channel = SocketChannel
.open(new InetSocketAddress(this.listenPort));
Thread.sleep(200);
channel.close();
client.getServerThread().stopAcceptingConnections();
client.getServerThread().join(2000);
......@@ -97,6 +98,7 @@ public class TunnelClientTests {
client.start();
SocketChannel channel = SocketChannel
.open(new InetSocketAddress(this.listenPort));
Thread.sleep(200);
client.stop();
assertThat(this.tunnelConnection.getOpenedTimes(), equalTo(1));
assertThat(this.tunnelConnection.isOpen(), equalTo(false));
......@@ -111,6 +113,7 @@ public class TunnelClientTests {
client.start();
SocketChannel channel = SocketChannel
.open(new InetSocketAddress(this.listenPort));
Thread.sleep(200);
channel.close();
client.getServerThread().stopAcceptingConnections();
client.getServerThread().join(2000);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment