Skip to content

Commit 98c157e

Browse files
committed
Add integration test to leave ServerEventsClient running for 1 hour
1 parent d68aee6 commit 98c157e

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/AndroidClient/client/src/test/java/net/servicestack/client/ServerEventClientTests.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import static chat.chatdtos.PostChatToChannel;
2525
import static chat.chatdtos.ResetServerEvents;
2626
import static org.junit.Assert.assertArrayEquals;
27+
import static org.junit.Assert.assertFalse;
2728

2829
/**
2930
* Created by mythz on 2/10/2017.
@@ -39,6 +40,18 @@ public ServerEventsClient createServerEventsClient(String baseUrl, String... cha
3940
return new ServerEventsClient(baseUrl, channels);
4041
}
4142

43+
public void renameto_test_leave_running() throws InterruptedException {
44+
final CountDownLatch signal = new CountDownLatch(1);
45+
46+
try (ServerEventsClient client = createServerEventsClient("http://chat.servicestack.net", "home")
47+
.setOnConnect(e -> {
48+
System.out.print("onConnect: " + e);
49+
}).start())
50+
{
51+
assertFalse(signal.await(60, TimeUnit.MINUTES));
52+
}
53+
}
54+
4255
public void test_Can_connect_to_ServerEventsStream() throws Exception {
4356
final CountDownLatch signal = new CountDownLatch(1);
4457

0 commit comments

Comments
 (0)