Skip to content

Commit

Permalink
make sure to close the connection at the end of the test
Browse files Browse the repository at this point in the history
  • Loading branch information
martinbonnin committed Jun 4, 2024
1 parent f36867e commit 8df5f83
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/engine/src/commonTest/kotlin/WebSocketEngineTest.kt
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@

import com.apollographql.apollo3.api.http.HttpHeader
import com.apollographql.apollo3.exception.ApolloException
import com.apollographql.apollo3.exception.ApolloNetworkException
import com.apollographql.apollo3.exception.ApolloWebSocketClosedException
import com.apollographql.apollo3.mockserver.DataMessage
import com.apollographql.apollo3.mockserver.CloseFrame
import com.apollographql.apollo3.mockserver.DataMessage
import com.apollographql.apollo3.mockserver.MockServer
import com.apollographql.apollo3.mockserver.TextMessage
import com.apollographql.apollo3.mockserver.awaitWebSocketRequest
Expand Down Expand Up @@ -111,6 +112,7 @@ class WebSocketEngineTest {
assertEquals("Bye now", e.reason)
}

connection.close()
webSocketServer.close()
}

Expand Down

0 comments on commit 8df5f83

Please sign in to comment.