removed runBlocking, as it's no longer necessary

This commit is contained in:
Robinson 2021-04-29 11:26:19 +02:00
parent 402c5a0ccd
commit a5a951f863

View File

@ -8,7 +8,6 @@ import dorkbox.network.connection.Connection
import dorkbox.network.exceptions.ClientException
import dorkbox.network.ipFilter.IpSubnetFilterRule
import kotlinx.atomicfu.atomic
import kotlinx.coroutines.runBlocking
import org.junit.Assert
import org.junit.Test
@ -45,7 +44,6 @@ class ConnectionFilterTest : BaseTest() {
stopEndPoints()
}
runBlocking {
try {
client.connect(LOOPBACK)
} catch (e: Exception) {
@ -53,7 +51,6 @@ class ConnectionFilterTest : BaseTest() {
throw e
}
}
}
waitForThreads()
@ -96,7 +93,6 @@ class ConnectionFilterTest : BaseTest() {
stopEndPoints()
}
runBlocking {
try {
client.connect(LOOPBACK)
} catch (e: Exception) {
@ -104,7 +100,6 @@ class ConnectionFilterTest : BaseTest() {
throw e
}
}
}
waitForThreads()
@ -146,7 +141,6 @@ class ConnectionFilterTest : BaseTest() {
stopEndPoints()
}
runBlocking {
try {
client.connect(LOOPBACK)
} catch (e: Exception) {
@ -154,7 +148,6 @@ class ConnectionFilterTest : BaseTest() {
throw e
}
}
}
waitForThreads()
@ -196,7 +189,6 @@ class ConnectionFilterTest : BaseTest() {
stopEndPoints()
}
runBlocking {
try {
client.connect(LOOPBACK)
} catch (e: Exception) {
@ -204,7 +196,6 @@ class ConnectionFilterTest : BaseTest() {
throw e
}
}
}
waitForThreads()
@ -239,17 +230,15 @@ class ConnectionFilterTest : BaseTest() {
stopEndPoints()
}
runBlocking {
try {
client.connect(LOOPBACK)
client.connect(LOOPBACK, 0)
} catch (e: Exception) {
stopEndPoints()
throw e
}
}
}
waitForThreads()
waitForThreads(0)
}
@Test(expected = ClientException::class)
@ -277,7 +266,6 @@ class ConnectionFilterTest : BaseTest() {
stopEndPoints()
}
runBlocking {
try {
client.connect(LOOPBACK)
} catch (e: Exception) {
@ -285,7 +273,6 @@ class ConnectionFilterTest : BaseTest() {
throw e
}
}
}
waitForThreads()
}
@ -325,7 +312,6 @@ class ConnectionFilterTest : BaseTest() {
stopEndPoints()
}
runBlocking {
try {
client.connect(LOOPBACK)
} catch (e: Exception) {
@ -333,7 +319,6 @@ class ConnectionFilterTest : BaseTest() {
throw e
}
}
}
waitForThreads()
@ -377,7 +362,6 @@ class ConnectionFilterTest : BaseTest() {
stopEndPoints()
}
runBlocking {
try {
client.connect(LOOPBACK)
} catch (e: Exception) {
@ -385,7 +369,6 @@ class ConnectionFilterTest : BaseTest() {
throw e
}
}
}
waitForThreads()
@ -422,7 +405,6 @@ class ConnectionFilterTest : BaseTest() {
stopEndPoints()
}
runBlocking {
try {
client.connect(LOOPBACK)
} catch (e: Exception) {
@ -430,7 +412,6 @@ class ConnectionFilterTest : BaseTest() {
throw e
}
}
}
waitForThreads()
}
@ -462,7 +443,6 @@ class ConnectionFilterTest : BaseTest() {
stopEndPoints()
}
runBlocking {
try {
client.connect(LOOPBACK)
} catch (e: Exception) {
@ -470,7 +450,6 @@ class ConnectionFilterTest : BaseTest() {
throw e
}
}
}
waitForThreads()
}