Skip to content

Commit

Permalink
use a different server for each test
Browse files Browse the repository at this point in the history
  • Loading branch information
martinbonnin committed Nov 9, 2023
1 parent 623865b commit 53b244f
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions tests/websockets/src/jvmTest/kotlin/incubating/SampleServerTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ import kotlinx.coroutines.launch
import kotlinx.coroutines.runBlocking
import kotlinx.coroutines.withTimeout
import okio.Buffer
import org.junit.After
import org.junit.AfterClass
import org.junit.Before
import org.junit.BeforeClass
import org.junit.Test
import sample.server.CountSubscription
Expand All @@ -38,20 +40,16 @@ import kotlin.test.assertNotNull
import kotlin.test.assertTrue

class SampleServerTest {
companion object {
private lateinit var sampleServer: SampleServer
private lateinit var sampleServer: SampleServer

@BeforeClass
@JvmStatic
fun beforeClass() {
sampleServer = SampleServer()
}
@Before
fun beforeClass() {
sampleServer = SampleServer()
}

@AfterClass
@JvmStatic
fun afterClass() {
sampleServer.close()
}
@After
fun afterClass() {
sampleServer.close()
}

private val networkTransportBuilder = WebSocketNetworkTransport.Builder()
Expand Down

0 comments on commit 53b244f

Please sign in to comment.