File tree Expand file tree Collapse file tree
src/test/java/kr/co/amateurs/server/controller/alarm Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1515import org .springframework .test .util .ReflectionTestUtils ;
1616import org .springframework .web .servlet .mvc .method .annotation .SseEmitter ;
1717
18+ import java .time .Duration ;
1819import java .util .concurrent .ConcurrentHashMap ;
1920
2021import static io .restassured .RestAssured .given ;
2122import static org .assertj .core .api .Assertions .assertThat ;
23+ import static org .awaitility .Awaitility .await ;
2224
2325@ Sql (scripts = "/reset.sql" , executionPhase = Sql .ExecutionPhase .BEFORE_TEST_CLASS )
2426@ Sql (scripts = "/reset.sql" , executionPhase = Sql .ExecutionPhase .AFTER_TEST_METHOD )
@@ -104,6 +106,9 @@ void setUp() {
104106 .then ()
105107 .statusCode (HttpStatus .OK .value ());
106108
109+ await ().atMost (Duration .ofSeconds (2 ))
110+ .until (() -> getConnections ().size () == 1 );
111+
107112 given ().header ("Authorization" , "Bearer " + accessToken )
108113 .accept (MediaType .TEXT_EVENT_STREAM_VALUE )
109114 .when ()
You can’t perform that action at this time.
0 commit comments