Skip to content
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

tapret_wlt_receiving_opret 100 times #16

Closed

Conversation

zoedberg
Copy link
Collaborator

This PR adds on top of #6:

This is not meant to be merged, it's just here to push ahead the discussion in #6

@@ -776,4 +779,30 @@ fn tapret_wlt_receiving_opret() {
1000,
None,
);
assert_eq!(consignment.bundles.len(), 0);
Copy link
Member

Choose a reason for hiding this comment

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

But this must be 3, isn't it?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, 0 is incorrect. The "fixing" PR has introduced this bug, as explained in #6 (comment)

Copy link
Member

Choose a reason for hiding this comment

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

If this is a bug I believe it must be a failing assertion, so we do not merge this PR unless the bug is fixed

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Please check the message of this PR, it says:

This is not meant to be merged, it's just here to push ahead the discussion in #6

Copy link
Member

Choose a reason for hiding this comment

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

Yes, I see that, but what confuses me is that all other PRs here fail unless there is a fix - and this one follows different approach

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The purpose of this PR is showing the tests are deterministic and there is no such case of consignment changing the number of bundles based on a run executed on a different hour/day. If I change the assertion the test would fail and it wouldn't be possible to show that it deterministically returns 0 bundles at every run. I don't see any issue in having a PR with a different approach since there are no better alternatives. Do you see alternatives?

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