Skip to content

Commit

Permalink
reduce timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
HollandDM committed Dec 19, 2024
1 parent df6c125 commit 5a87bbb
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -190,12 +190,10 @@ abstract private class PublisherToSubscriberTest extends Test:
subscriber2 <- streamSubscriber
subscriber3 <- streamSubscriber
subscriber4 <- streamSubscriber
gatherFiber <- Fiber.gather[Nothing, Unit, Any](List(
subscriber1.stream.run.unit,
subscriber2.stream.run.unit,
subscriber3.stream.run.unit,
subscriber4.stream.run.unit
))
fiber1 <- Async.run(subscriber1.stream.run.unit)
fiber2 <- Async.run(subscriber2.stream.run.unit)
fiber3 <- Async.run(subscriber3.stream.run.unit)
fiber4 <- Async.run(subscriber4.stream.run.unit)
publisherFiber <- Async.run(Resource.run(
Stream(Emit.andMap(Chunk.empty)(emit(_, counter)))
.toPublisher
Expand All @@ -209,8 +207,11 @@ abstract private class PublisherToSubscriberTest extends Test:
))
_ <- Clock.sleep(10.millis).map { fiber =>
fiber.onComplete(_ => publisherFiber.interrupt.unit).andThen(fiber)
}.map(_.get)
_ <- gatherFiber.get
}.map(_.getResult)
_ <- fiber1.getResult
_ <- fiber2.getResult
_ <- fiber3.getResult
_ <- fiber4.getResult
yield assert(true)
end for
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import org.reactivestreams.tck.PublisherVerification
import org.reactivestreams.tck.TestEnvironment
import org.scalatestplus.testng.*

final class StreamPublisherTest extends PublisherVerification[Int](new TestEnvironment(1000L)), TestNGSuiteLike:
final class StreamPublisherTest extends PublisherVerification[Int](new TestEnvironment(10L)), TestNGSuiteLike:
import AllowUnsafe.embrace.danger
given Frame = Frame.internal

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import org.reactivestreams.tck.SubscriberWhiteboxVerification.WhiteboxSubscriber
import org.reactivestreams.tck.TestEnvironment
import org.scalatestplus.testng.*

class StreamSubscriberTest extends SubscriberWhiteboxVerification[Int](new TestEnvironment(1000L)), TestNGSuiteLike:
class StreamSubscriberTest extends SubscriberWhiteboxVerification[Int](new TestEnvironment(10L)), TestNGSuiteLike:
import AllowUnsafe.embrace.danger
private val counter = new AtomicInteger()

Expand Down

0 comments on commit 5a87bbb

Please sign in to comment.