From 2d3e19cfe50dab4772727797347c1bf244b4aa7c Mon Sep 17 00:00:00 2001 From: jfarcand Date: Thu, 25 Jun 2020 15:43:30 -0400 Subject: [PATCH] Update Atmosphere versions used in smoke test See gh-221144 --- .../spring-boot-smoke-test-atmosphere/build.gradle | 4 ++-- .../src/main/resources/static/javascript/application.js | 9 ++++----- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-atmosphere/build.gradle b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-atmosphere/build.gradle index 27f86bf5db09..d8f00c7c2517 100644 --- a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-atmosphere/build.gradle +++ b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-atmosphere/build.gradle @@ -7,9 +7,9 @@ description = "Spring Boot Atmosphere smoke test" dependencies { implementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-web")) - implementation("org.atmosphere:atmosphere-runtime:2.4.14") + implementation("org.atmosphere:atmosphere-runtime:2.6.1") - runtimeOnly("org.webjars:atmosphere-javascript:2.3.4") + runtimeOnly("org.webjars:atmosphere-javascript:3.0.4") testImplementation(enforcedPlatform(project(":spring-boot-project:spring-boot-dependencies"))) testImplementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-test")) diff --git a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-atmosphere/src/main/resources/static/javascript/application.js b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-atmosphere/src/main/resources/static/javascript/application.js index 275c66ebbc5a..284abb1eb4fd 100644 --- a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-atmosphere/src/main/resources/static/javascript/application.js +++ b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-atmosphere/src/main/resources/static/javascript/application.js @@ -44,8 +44,7 @@ $(function() { + request.reconnectInterval })); subSocket - .push(atmosphere.util - .stringifyJSON({ + .push(JSON.stringify({ author : author, message : 'is inactive and closed the connection. Will reconnect in ' + request.reconnectInterval @@ -81,7 +80,7 @@ $(function() { var message = response.responseBody; try { - var json = atmosphere.util.parseJSON(message); + var json = JSON.parse(message); } catch (e) { console.log('This doesn\'t look like a valid JSON: ', message); return; @@ -105,7 +104,7 @@ $(function() { text : 'Server closed the connection after a timeout' })); if (subSocket) { - subSocket.push(atmosphere.util.stringifyJSON({ + subSocket.push(JSON.stringify({ author : author, message : 'disconnecting' })); @@ -140,7 +139,7 @@ $(function() { author = msg; } - subSocket.push(atmosphere.util.stringifyJSON({ + subSocket.push(JSON.stringify({ author : author, message : msg }));