|
1 | 1 | /*
|
2 |
| - * Copyright 2002-2014 the original author or authors. |
| 2 | + * Copyright 2002-2015 the original author or authors. |
3 | 3 | *
|
4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License");
|
5 | 5 | * you may not use this file except in compliance with the License.
|
@@ -94,7 +94,6 @@ public void setup() throws Exception {
|
94 | 94 | this.errorFilter = new ErrorFilter();
|
95 | 95 | this.wac = new AnnotationConfigWebApplicationContext();
|
96 | 96 | this.wac.register(TestConfig.class, upgradeStrategyConfigClass());
|
97 |
| - this.wac.refresh(); |
98 | 97 | this.server = createWebSocketTestServer();
|
99 | 98 | this.server.setup();
|
100 | 99 | this.server.deployConfig(this.wac, this.errorFilter);
|
@@ -218,7 +217,9 @@ public void fallbackAfterConnectTimeout() throws Exception {
|
218 | 217 | this.errorFilter.sleepDelayMap.put("/xhr_streaming", 10000L);
|
219 | 218 | this.errorFilter.responseStatusMap.put("/xhr_streaming", 503);
|
220 | 219 | initSockJsClient(createXhrTransport());
|
221 |
| - this.sockJsClient.setConnectTimeoutScheduler(this.wac.getBean(ThreadPoolTaskScheduler.class)); |
| 220 | + ThreadPoolTaskScheduler scheduler = new ThreadPoolTaskScheduler(); |
| 221 | + scheduler.afterPropertiesSet(); |
| 222 | + this.sockJsClient.setConnectTimeoutScheduler(scheduler); |
222 | 223 | WebSocketSession clientSession = sockJsClient.doHandshake(clientHandler, this.baseUrl + "/echo").get();
|
223 | 224 | assertEquals("Fallback didn't occur", XhrClientSockJsSession.class, clientSession.getClass());
|
224 | 225 | TextMessage message = new TextMessage("message1");
|
|
0 commit comments