-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add debugging information for Firestore integration tests #5746
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
Add debugging information for Firestore integration tests #5746
Conversation
Codecov Report
@@ Coverage Diff @@
## master #5746 +/- ##
============================================
- Coverage 47.09% 46.12% -0.98%
+ Complexity 25079 24189 -890
============================================
Files 2389 2456 +67
Lines 259750 262236 +2486
Branches 29400 29602 +202
============================================
- Hits 122329 120953 -1376
- Misses 128458 132172 +3714
- Partials 8963 9111 +148
Continue to review full report at Codecov.
|
|
An example of the new diagnostic assertion: |
Add an assertion to verify the expected number of events are delivered to the queryWatch test. Awaiting the semaphore now has a 60sec timeout. If not satisfied within that timespan the test will fail, and provide an assertion message of the progress. Updates to allow running builds locally * Update build script to cd to checkout directory relative to itself instead of using a hard-coded path. * Update build script to be tolerant of absolute paths specified for GOOGLE_APPLICATION_CREDENTIALS
|
So does this mean it failed on case 0, or finished case 0 and failed in case 1? I would add clarifying language in the error message to demonstrate this. |
It's saying that it expected 6 cases to be performed, but only 1 of them was performed. The cases reported in actual are what actually happened. The main thing is that the number of expected async operations didn't happen during the test run. What would you expect as the reported message? |
|
@kolea2 Updated message per our offline conversation. |
|
@chingor13 Can you take a look at my changes to |
Co-Authored-By: Jeff Ching <chingor@google.com>
| @Override | ||
| public void onEvent( | ||
| @Nullable QuerySnapshot value, @Nullable FirestoreException error) { | ||
| System.out.printf("onEvent(value : %s, error : %s)%n", value, error); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: is this intentionally left here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I'm wanting to see the events flowing in vs the switch branches below being hit. I haven't yet ruled out if there is some sort of race happening on the events being delivered.
Add an assertion to verify the expected number of events are delivered
to the queryWatch test. Awaiting the semaphore now has a 60sec timeout.
If not satisfied within that timespan the test will fail, and provide
an assertion message of the progress.
Updates to allow running builds locally
instead of using a hard-coded path.
GOOGLE_APPLICATION_CREDENTIALS