-
Notifications
You must be signed in to change notification settings - Fork 459
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
TestResultCoordinator: Explicitly fail for duplicate expected results (#4684) #4863
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…Azure#4684) We need to account for duplicate expected results in our tests. The test report operates with an assumption that expected results are unique and actual results can be duplicated. When duplicate expected results happen (due to product issues), the test report makes it seem like we are missing some actual results. But we need to make it explicit that there are duplicate expected results, which should not be happening in our tests. Here is what I mean. Imagine the following scenario: ``` Message 0 sent Message 1 sent Message 1 sent Message 2 sent ~ time passes ~ Message 0 received Message 1 received Message 1 received Message 2 received ``` In the TRC here are the expected / actual datastructures: ``` Expected: 0->1->1->2 Actual: 0->1->1->->2 ``` When the TRC is processing the report it does not account for duplicate actual results. So it is the same scenario as this: ``` Expected: 0->1->1->2 Actual: 0->1->2 ``` In processing the counting report, we match results 0 and 1. We see that there are duplicate actual results for 1 so we eliminate them. Then end up in this state which is the problem. Now the counting report will view the situation as we have an unmatched expected result with sequence number 1. This is not the case. ``` Expected: 1->2 Actual: 2 ``` The report looks indicates there is one unmatched result. But really all results are matched. It is just that there is a duplicate expected result. The test report will now reflect this by giving us the number of duplicate expected results that were seen.
and-rewsmith
changed the title
TestResultCoordinator: Explicitly fail for duplicate expected results
TestResultCoordinator: Explicitly fail for duplicate expected results (#4684)
Apr 16, 2021
damonbarry
approved these changes
Apr 16, 2021
yophilav
approved these changes
Apr 16, 2021
ggjjj
pushed a commit
to ggjjj/iotedge
that referenced
this pull request
Jul 22, 2021
…Azure#4684) (Azure#4863) … (Azure#4684) We need to account for duplicate expected results in our tests. The test report operates with an assumption that expected results are unique and actual results can be duplicated. When duplicate expected results happen (due to product issues), the test report makes it seem like we are missing some actual results. But we need to make it explicit that there are duplicate expected results, which should not be happening in our tests. Here is what I mean. Imagine the following scenario: ``` Message 0 sent Message 1 sent Message 1 sent Message 2 sent ~ time passes ~ Message 0 received Message 1 received Message 1 received Message 2 received ``` In the TRC here are the expected / actual datastructures: ``` Expected: 0->1->1->2 Actual: 0->1->1->->2 ``` When the TRC is processing the report it does not account for duplicate actual results. So it is the same scenario as this: ``` Expected: 0->1->1->2 Actual: 0->1->2 ``` In processing the counting report, we match results 0 and 1. We see that there are duplicate actual results for 1 so we eliminate them. Then end up in this state which is the problem. Now the counting report will view the situation as we have an unmatched expected result with sequence number 1. This is not the case. ``` Expected: 1->2 Actual: 2 ``` The report looks indicates there is one unmatched result. But really all results are matched. It is just that there is a duplicate expected result. The test report will now reflect this by giving us the number of duplicate expected results that were seen.
damonbarry
pushed a commit
to damonbarry/iotedge
that referenced
this pull request
Apr 15, 2022
…Azure#4684) (Azure#4863) … (Azure#4684) We need to account for duplicate expected results in our tests. The test report operates with an assumption that expected results are unique and actual results can be duplicated. When duplicate expected results happen (due to product issues), the test report makes it seem like we are missing some actual results. But we need to make it explicit that there are duplicate expected results, which should not be happening in our tests. Here is what I mean. Imagine the following scenario: ``` Message 0 sent Message 1 sent Message 1 sent Message 2 sent ~ time passes ~ Message 0 received Message 1 received Message 1 received Message 2 received ``` In the TRC here are the expected / actual datastructures: ``` Expected: 0->1->1->2 Actual: 0->1->1->->2 ``` When the TRC is processing the report it does not account for duplicate actual results. So it is the same scenario as this: ``` Expected: 0->1->1->2 Actual: 0->1->2 ``` In processing the counting report, we match results 0 and 1. We see that there are duplicate actual results for 1 so we eliminate them. Then end up in this state which is the problem. Now the counting report will view the situation as we have an unmatched expected result with sequence number 1. This is not the case. ``` Expected: 1->2 Actual: 2 ``` The report looks indicates there is one unmatched result. But really all results are matched. It is just that there is a duplicate expected result. The test report will now reflect this by giving us the number of duplicate expected results that were seen.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
… (#4684)
We need to account for duplicate expected results in our tests. The test report operates with an assumption that expected results are unique and actual results can be duplicated. When duplicate expected results happen (due to product issues), the test report makes it seem like we are missing some actual results. But we need to make it explicit that there are duplicate expected results, which should not be happening in our tests.
Here is what I mean. Imagine the following scenario:
In the TRC here are the expected / actual datastructures:
When the TRC is processing the report it does not account for duplicate actual results. So it is the same scenario as this:
In processing the counting report, we match results 0 and 1. We see that there are duplicate actual results for 1 so we eliminate them. Then end up in this state which is the problem. Now the counting report will view the situation as we have an unmatched expected result with sequence number 1. This is not the case.
The report looks indicates there is one unmatched result. But really all results are matched. It is just that there is a duplicate expected result. The test report will now reflect this by giving us the number of duplicate expected results that were seen.