emit.forEach
with restartable
transformer emits both events
#3888
Labels
bug
Something isn't working
needs triage
This issue requires triage
pkg:bloc_concurrency
This issue is related to the bloc_concurrency package
Description
Hi @felangel . I'm working with
restartable
transformer.Here is example with test
https://github.com/vasilich6107/bloc_stream_restartable
Steps To Reproduce
Run tests from test folder.
Expected Behavior
I'm making 2 async requests using
variables1
andvariables2
.On mock level I do some delays to emulate async requests.
With restartable transformer I assume that second
bloc.run(variables2);
will cancel previous handler.As a result I expect
In reality I'm getting one loading state and 2 loaded.
Screenshots
![image](https://private-user-images.githubusercontent.com/6721286/248509891-8f062f13-ef68-420a-919f-d42cacfaa5cd.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk2OTAyMjksIm5iZiI6MTczOTY4OTkyOSwicGF0aCI6Ii82NzIxMjg2LzI0ODUwOTg5MS04ZjA2MmYxMy1lZjY4LTQyMGEtOTE5Zi1kNDJjYWNmYWE1Y2QucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxNiUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTZUMDcxMjA5WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9YjRhYzFmOGYxMDQ0ZjgyZmIwMTI2ZTc2NGU5NzFkYjYyZmUwNjI1ZDNjMzU1ZGY0NmViMWYxNGMzYjlkNTRmNCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.6qDfcvnSBDwn6cUKnBhcOb5RYfWMlJo7nlnZXemzBOo)
The text was updated successfully, but these errors were encountered: