Test sometimes complains: "Received an error when stream was already finished"
- Dominant language
- TypeScript
- Stars
- 12.9k
- Forks
- 625
- Avg merge
- 5h 23m
- Merged PRs (30d)
- 24
Description
There seems to be a timing issue here:
```
[@dataplan/pg]: PASS @dataplan/pg __tests__/queries/conditions/archived-forum-inherited-messages.stream-3.test.graphql
[@dataplan/pg]: ● Console
[@dataplan/pg]:
[@dataplan/pg]: console.error
[@dataplan/pg]: GraphileInternalError<2a6a34e4-a172-4c9a-b74e-b87ccf1b6d47>: Received an error when stream was already finished: Error: Test transaction has already been ended - async operations shouldn't keep happening after grafast returns
[@dataplan/pg]:
[@dataplan/pg]: 707 | const handleFetchError = (error: Error) => {
[@dataplan/pg]: 708 | if (finished) {
[@dataplan/pg]: > 709 | console.error(
[@dataplan/pg]: | ^
[@dataplan/pg]: 710 | `GraphileInternalError<2a6a34e4-a172-4c9a-b74e-b87ccf1b6d47>: Received an error when stream was already finished: ${error}`,
[@dataplan/pg]: 711 | );
[@dataplan/pg]: 712 | return;
[@dataplan/pg]:
[@dataplan/pg]: at error (src/executor.ts:709:21)
[@dataplan/pg]:
```
This doesn't always happen.
Contributor guide
Assessment
This issue has not been assessed yet.