Skip to content

Commit

Permalink
Identify update
Browse files Browse the repository at this point in the history
  • Loading branch information
erwin-kok committed Sep 3, 2023
1 parent 6d91ea4 commit 9f0ba49
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ See for an in-depth description of libp2p, please see: https://libp2p.io/
- [ ] Quic (planned)

- Protocols
- [ ] Identify (planned)
- [X] Identify
- [X] Ping
- [ ] DHT/Kademlia (planned)
- [ ] pubsub (planned)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ import org.junit.jupiter.api.Test
import kotlin.time.Duration
import kotlin.time.Duration.Companion.hours
import kotlin.time.Duration.Companion.milliseconds
import kotlin.time.Duration.Companion.minutes
import kotlin.time.Duration.Companion.seconds

class IdServiceTest {
Expand Down Expand Up @@ -315,7 +316,7 @@ class IdServiceTest {
}

@Test
fun largeIdentifyMessage() = runTest {
fun largeIdentifyMessage() = runTest(timeout = 1.minutes) {
withContext(Dispatchers.Default) {
val h1 = BlankHost.create(this, SwarmTestBuilder.create(this)).expectNoErrors()
val h2 = BlankHost.create(this, SwarmTestBuilder.create(this)).expectNoErrors()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,15 @@ import org.junit.jupiter.api.DynamicTest
import org.junit.jupiter.api.function.Executable
import java.util.stream.Stream
import kotlin.random.Random
import kotlin.time.Duration.Companion.minutes

class DatastoreTestSuite(private val dsName: String) {
private class SubTestExecutable<T : Datastore>(
private val create: (CoroutineScope) -> T,
private val exec: suspend (CoroutineScope, T) -> Unit,
private val cleanup: suspend (CoroutineScope, T) -> Unit,
) : Executable {
override fun execute() = runTest {
override fun execute() = runTest(timeout = 1.minutes) {
val element = create(this)
element.use {
exec(this, element)
Expand Down

0 comments on commit 9f0ba49

Please sign in to comment.