Skip to content
This repository has been archived by the owner on Apr 4, 2024. It is now read-only.

Commit

Permalink
Adding infinite duration for certain long lasting unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mjovanc committed Aug 5, 2023
1 parent a3809d3 commit 3ed691e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class BlockClientTest {

@Test
@OptIn(kotlinx.coroutines.ExperimentalCoroutinesApi::class)
fun `can get blocks details by heights`() = runTest {
fun `can get blocks details by heights`() = runTest(timeout = infiniteDuration) {
// Arrange
val blocksWithHeights1 = BlocksDetailsByHeightsRequest(listOf(1, 2, 3))
val blocksWithHeights100 = BlocksDetailsByHeightsRequest(listOf(100, 101, 102, 103, 104, 105))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ class WalletClientTest {

private val clientHTTPS = WalletClient(nodeHTTPS)

private val infiniteDuration = Duration.INFINITE

@Test
@OptIn(kotlinx.coroutines.ExperimentalCoroutinesApi::class)
fun `can get wallet sync data without body` () = runTest {
Expand Down Expand Up @@ -61,7 +63,7 @@ class WalletClientTest {

@Test
@OptIn(kotlinx.coroutines.ExperimentalCoroutinesApi::class)
fun `can get wallet sync data with start height and start timestamp`() = runTest {
fun `can get wallet sync data with start height and start timestamp`() = runTest(timeout = infiniteDuration) {
// Arrange
val requestData = WalletSyncDataRequest(
startHeight = 100000,
Expand Down

0 comments on commit 3ed691e

Please sign in to comment.