From 23f2a35958459d276394e930a4b3deb487555b8a Mon Sep 17 00:00:00 2001 From: Dave Syer Date: Wed, 12 Oct 2016 12:05:29 +0200 Subject: [PATCH] Add a sleep to try and avoid sporadic fails --- .../retry/annotation/ProxyApplicationTests.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/test/java/org/springframework/retry/annotation/ProxyApplicationTests.java b/src/test/java/org/springframework/retry/annotation/ProxyApplicationTests.java index 38030c6..f580c29 100644 --- a/src/test/java/org/springframework/retry/annotation/ProxyApplicationTests.java +++ b/src/test/java/org/springframework/retry/annotation/ProxyApplicationTests.java @@ -22,9 +22,13 @@ public class ProxyApplicationTests { @Test // See gh-53 - public void contextLoads() { + public void contextLoads() throws Exception { int count = count(); runAndClose(); + runAndClose(); + // Let the JVM catch up + Thread.sleep(500L); + runAndClose(); int base = count(); runAndClose(); count = count();