Skip to content

Conversation

@davidmartos96
Copy link
Contributor

Continuation of #396

@isoos
Copy link
Owner

isoos commented Dec 21, 2024

Note: I think before considering this, we should revisit the regular connection's close(force: true). I have found that I have troubles with the test if instead ignoring, I want to assert the output of runLongQuery(conn). Not sure what's going on there, but it feels like we should do better.

@davidmartos96
Copy link
Contributor Author

davidmartos96 commented Dec 21, 2024

@isoos What kind of assert were you thinking about?

@isoos
Copy link
Owner

isoos commented Dec 21, 2024

https://github.com/isoos/postgresql-dart/blob/master/test/v3_close_test.dart#L105

it should be:

await expectLater(rs, throwsA(isA<PgException>()));

I've added an exception to the result stream, and it kind of works, but for some reason that eludes me, the rs does throw, but the test still fails. Not sure why.

@davidmartos96
Copy link
Contributor Author

davidmartos96 commented Dec 21, 2024

https://github.com/isoos/postgresql-dart/blob/master/test/v3_close_test.dart#L105

it should be:

await expectLater(rs, throwsA(isA<PgException>()));

I've added an exception to the result stream, and it kind of works, but for some reason that eludes me, the rs does throw, but the test still fails. Not sure why.

Could it be a top level unhandled exception? I remember I had to do a <future>.ignore() to one of the long running because of that. Because no one would be listening the result of the future

@isoos
Copy link
Owner

isoos commented Dec 22, 2024

Closing this in favor of #405.

@isoos isoos closed this Dec 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants