Skip to content

Missing stacktrace basic reproduction test #14

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 4, 2021

Conversation

davidmartos96
Copy link
Contributor

@isoos Here is a basic test case which reproduces #13 . I've included the docker_process package, so it will run a local postgres container.

Copy link
Owner

@isoos isoos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, mostly nitpicking requests.

const _kContainerName = 'postgres-dart-test';

Future<void> startPostgresContainer() async {
setUpAll(() async {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's also add a teardownAll that stops the container

test/docker.dart Outdated

const _kContainerName = 'postgres-dart-test';

Future<void> startPostgresContainer() async {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think async happens only in the setupAll, so this method should rather be something like void usePostgresDocker() {.

test/docker.dart Outdated
});
}

Future<bool> isPostgresContainerRunning() async {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's make this private.

}

await startPostgres(
name: _kContainerName,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a nice thing to have here, I haven't really thought that you'd match the CI's config, but it makes sense.


import 'docker.dart';

Future<void> main() async {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test main can be void main() { without the async block.

@davidmartos96
Copy link
Contributor Author

@isoos I've updated the PR with the comments

@isoos
Copy link
Owner

isoos commented Nov 4, 2021

this looks good and it is a good baseline for debugging... can I just merge it?

@davidmartos96
Copy link
Contributor Author

this looks good and it is a good baseline for debugging... can I just merge it?

Yes, go ahead! I've tried debugging it, but I didn't know where to start because of the event system the library uses.

@isoos isoos marked this pull request as ready for review November 4, 2021 21:05
@isoos isoos changed the title WIP: Missing stacktrace basic reproduction test Missing stacktrace basic reproduction test Nov 4, 2021
@isoos isoos merged commit a3fe383 into isoos:master Nov 4, 2021
@isoos
Copy link
Owner

isoos commented Nov 4, 2021

I've tried debugging it, but I didn't know where to start because of the event system the library uses.

There are a few places where one can start putting e.g. debug/print statements:

  • just before we call any Completer.complete or Completer.completeError
  • when the new data coming in is being parsed.

Feel free to update the issue if you find something, I'll try to find time to debug this over the weekend too...

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