Skip to content

Commit f9bd9cb

Browse files
committed
Increase more SignalR Java client test timeouts
1 parent 741d98f commit f9bd9cb

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

src/SignalR/clients/java/signalr/test/src/main/java/com/microsoft/signalr/HubConnectionTest.java

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
import java.util.concurrent.atomic.AtomicReference;
1818

1919
import org.junit.jupiter.api.Test;
20-
import org.junit.jupiter.api.Disabled;
2120

2221
import ch.qos.logback.classic.spi.ILoggingEvent;
2322
import io.reactivex.Completable;
@@ -2584,14 +2583,14 @@ public void throwFromOnHandlerRunsAllHandlers() {
25842583
value2.set(param1);
25852584
}, String.class);
25862585

2587-
hubConnection.start().timeout(1, TimeUnit.SECONDS).blockingAwait();
2586+
hubConnection.start().timeout(30, TimeUnit.SECONDS).blockingAwait();
25882587
mockTransport.receiveMessage("{\"type\":1,\"target\":\"inc\",\"arguments\":[\"Hello World\"]}" + RECORD_SEPARATOR);
25892588

25902589
// Confirming that our handler was called and the correct message was passed in.
25912590
assertEquals("Hello World", value1.get());
25922591
assertEquals("Hello World", value2.get());
25932592

2594-
hubConnection.stop().timeout(1, TimeUnit.SECONDS).blockingAwait();
2593+
hubConnection.stop().timeout(30, TimeUnit.SECONDS).blockingAwait();
25952594

25962595
ILoggingEvent log = logger.assertLog("Invoking client side method 'inc' failed:");
25972596
assertEquals("throw from on handler", log.getThrowableProxy().getMessage());
@@ -3190,15 +3189,14 @@ public void stopWithoutObservingWithLongPollingTransportStops() {
31903189
closed.onComplete();
31913190
});
31923191

3193-
hubConnection.start().timeout(1, TimeUnit.SECONDS).blockingAwait();
3192+
hubConnection.start().timeout(30, TimeUnit.SECONDS).blockingAwait();
31943193

31953194
hubConnection.stop();
3196-
closed.timeout(1, TimeUnit.SECONDS).blockingAwait();
3195+
closed.timeout(30, TimeUnit.SECONDS).blockingAwait();
31973196
blockGet.onComplete();
31983197
assertEquals(HubConnectionState.DISCONNECTED, hubConnection.getConnectionState());
31993198
}
32003199

3201-
@Disabled
32023200
@Test
32033201
public void hubConnectionClosesAndRunsOnClosedCallbackAfterCloseMessageWithLongPolling() {
32043202
AtomicInteger requestCount = new AtomicInteger(0);
@@ -3229,12 +3227,12 @@ public void hubConnectionClosesAndRunsOnClosedCallbackAfterCloseMessageWithLongP
32293227
hubConnection.onClosed((ex) -> {
32303228
closed.onComplete();
32313229
});
3232-
hubConnection.start().timeout(1, TimeUnit.SECONDS).blockingAwait();
3230+
hubConnection.start().timeout(30, TimeUnit.SECONDS).blockingAwait();
32333231

32343232
assertEquals(HubConnectionState.CONNECTED, hubConnection.getConnectionState());
32353233
blockGet.onComplete();
32363234

3237-
closed.timeout(1, TimeUnit.SECONDS).blockingAwait();
3235+
closed.timeout(30, TimeUnit.SECONDS).blockingAwait();
32383236

32393237
assertEquals(HubConnectionState.DISCONNECTED, hubConnection.getConnectionState());
32403238
}

src/SignalR/clients/java/signalr/test/src/main/java/com/microsoft/signalr/LongPollingTransportTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ public void ErrorFromClosePropagatesOnSecondStopCall() {
392392
Map<String, String> headers = new HashMap<>();
393393
LongPollingTransport transport = new LongPollingTransport(headers, client, Single.just(""));
394394

395-
transport.start("http://example.com").timeout(100, TimeUnit.SECONDS).blockingAwait();
395+
transport.start("http://example.com").timeout(30, TimeUnit.SECONDS).blockingAwait();
396396

397397
RuntimeException exception = assertThrows(RuntimeException.class, () -> transport.stop().blockingAwait(100, TimeUnit.SECONDS));
398398
assertEquals("Request has no handler: DELETE http://example.com", exception.getMessage());

0 commit comments

Comments
 (0)