Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
5de5390e
Commit
5de5390e
authored
Jun 14, 2021
by
Andy Wilkinson
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '2.4.x' into 2.5.x
Closes gh-26889
parents
3858c629
c89430e1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
HttpTunnelServerTests.java
...rk/boot/devtools/tunnel/server/HttpTunnelServerTests.java
+6
-3
No files found.
spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/tunnel/server/HttpTunnelServerTests.java
View file @
5de5390e
...
...
@@ -22,11 +22,13 @@ import java.net.SocketTimeoutException;
import
java.nio.ByteBuffer
;
import
java.nio.channels.ByteChannel
;
import
java.nio.channels.Channels
;
import
java.time.Duration
;
import
java.util.concurrent.BlockingDeque
;
import
java.util.concurrent.LinkedBlockingDeque
;
import
java.util.concurrent.TimeUnit
;
import
java.util.concurrent.atomic.AtomicBoolean
;
import
org.awaitility.Awaitility
;
import
org.junit.jupiter.api.BeforeEach
;
import
org.junit.jupiter.api.Test
;
import
org.junit.jupiter.api.extension.ExtendWith
;
...
...
@@ -236,13 +238,14 @@ class HttpTunnelServerTests {
this
.
server
.
setLongPollTimeout
(
100
);
MockHttpConnection
h1
=
new
MockHttpConnection
();
this
.
server
.
handle
(
h1
);
Awaitility
.
await
().
atMost
(
Duration
.
ofSeconds
(
30
)).
until
(
h1
.
getServletResponse
()::
getStatus
,
(
status
)
->
status
==
204
);
MockHttpConnection
h2
=
new
MockHttpConnection
();
this
.
server
.
handle
(
h2
);
Thread
.
sleep
(
400
);
Awaitility
.
await
().
atMost
(
Duration
.
ofSeconds
(
30
)).
until
(
h2
.
getServletResponse
()::
getStatus
,
(
status
)
->
status
==
204
);
this
.
serverChannel
.
disconnect
();
this
.
server
.
getServerThread
().
join
();
assertThat
(
h1
.
getServletResponse
().
getStatus
()).
isEqualTo
(
204
);
assertThat
(
h2
.
getServletResponse
().
getStatus
()).
isEqualTo
(
204
);
}
@Test
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment