# Attached / Non-Async TestSource

**URL:** <https://discuss.akka.io/t/attached-non-async-testsource/7156>\
**Category:** Akka Streams & Alpakka\
**Tags:** streams\
**Created:** [September 10, 2020, 1:46am UTC](https://discuss.akka.io/t/attached-non-async-testsource/7156 "2020-09-10T01:46:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![steinybot](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.akka.io/steinybot/32/1862_2.png) [@steinybot](https://discuss.akka.io/u/steinybot)\
**Post date:** [September 10, 2020, 1:46am UTC](https://discuss.akka.io/t/attached-non-async-testsource/7156/1 "2020-09-10T01:46:23Z")

</div>

Hi,

When writing my own Akka Streams stages I’m finding it quite difficult to test that they pull / backpressure under the correct situations.

The main problem is that `TestSource` is a detached stage and inserts an async boundary between itself and my stage. This seems to be stemming from the fact that `ProbeSource` extends `SourceModule` which wraps it in an island.

The only workaround I have found is to change the buffer size to `1` and then I have to remember to ignore the first request. This seems to work but can be a bit cumbersome.

I’m a little surprised that this isn’t more of a problem. Is there some other approach to testing backpressure that I am no aware of?

Cheers,  
Jason

---

<div class="post-metadata">

**Author:** ![johanandren](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.akka.io/johanandren/32/85_2.png) [@johanandren](https://discuss.akka.io/u/johanandren)\
**Post date:** [September 10, 2020, 2:48pm UTC](https://discuss.akka.io/t/attached-non-async-testsource/7156/2 "2020-09-10T14:48:38Z")

</div>

I don’t know of another option.

I think something like the typed BehaviorTestKit - a simulator running the graph stage - could be neat, not sure how hard it would be to achieve though.
