Skip to content

Firestore: Update test bloomFilterShouldCorrectlyEncodeComplexUnicodeCharacters() in QueryTest.java #5145

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
Jul 14, 2023

Conversation

dconeybe
Copy link
Contributor

@dconeybe dconeybe commented Jul 7, 2023

Modify the test bloomFilterShouldCorrectlyEncodeComplexUnicodeCharacters() in QueryTest.java, that was added by the recent PR #5135, to directly check the bloom filter for containing the document paths with complex Unicode characters. Previously, it was indirectly checking this via the other properties of the existence filter. As a result, the "retry" logic was removed, since it doesn't matter if there is a false positive.

To add the ability to directly interrogate the bloom filter, the testing hooks needed to be augmented to expose the BloomFilter, projectId, and databaseId.

This is a port of firebase/firebase-js-sdk#7413.

Some refactorings/cleanup from this PR were backported to the web sdk in firebase/firebase-js-sdk#7474.

…ing the document paths with complex Unicode characters, rather than indirectly testing it via the QuerySnapshot.
@github-actions
Copy link
Contributor

github-actions bot commented Jul 7, 2023

Release note changes

No release note changes were detected. If you made changes that should be
present in the next release, ensure you've added an entry in the appropriate
CHANGELOG.md file(s).

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Jul 7, 2023

Coverage Report 1

Affected Products

  • firebase-firestore

    Overall coverage changed from 44.35% (4d1cc39) to 44.33% (05fe38b) by -0.02%.

    FilenameBase (4d1cc39)Merge (05fe38b)Diff
    AutoValue_TestingHooks_ExistenceFilterMismatchInfo.java20.00%23.08%+3.08%
    LruGarbageCollector.java97.27%93.64%-3.64%
    PatchMutation.java100.00%98.39%-1.61%
    TestingHooks.java64.52%66.67%+2.15%
    WatchChangeAggregator.java98.60%98.64%+0.03%

Test Logs

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/4okmtvMvZv.html

@github-actions
Copy link
Contributor

github-actions bot commented Jul 7, 2023

Unit Test Results

   162 files  +   108     162 suites  +108   2m 7s ⏱️ - 4m 58s
1 164 tests +   694  1 148 ✔️ +   678  16 💤 +16  0 ±0 
2 328 runs  +1 388  2 296 ✔️ +1 356  32 💤 +32  0 ±0 

Results for commit 41e84f3. ± Comparison against base commit 4d1cc39.

This pull request removes 470 and adds 1164 tests. Note that renamed tests count towards both.
com.google.firebase.iid.FirebaseInstanceIdWithFcmReceiverRoboTest ‑ testBindsService_oAndTargetingO
com.google.firebase.iid.FirebaseInstanceIdWithFcmReceiverRoboTest ‑ testNoWrappedIntent
com.google.firebase.iid.FirebaseInstanceIdWithFcmReceiverRoboTest ‑ testNullIntent
com.google.firebase.iid.FirebaseInstanceIdWithFcmReceiverRoboTest ‑ testStartsService_OTargetingO_highPriority
com.google.firebase.iid.FirebaseInstanceIdWithFcmReceiverRoboTest ‑ testStartsService_fallsBackToBindService
com.google.firebase.iid.FirebaseInstanceIdWithFcmReceiverRoboTest ‑ testStartsService_notOButTargetingO
com.google.firebase.iid.FirebaseInstanceIdWithFcmReceiverRoboTest ‑ testStartsService_notOButTargetingO[19]
com.google.firebase.iid.FirebaseInstanceIdWithFcmReceiverRoboTest ‑ testStartsService_notOButTargetingO[21]
com.google.firebase.iid.FirebaseInstanceIdWithFcmReceiverRoboTest ‑ testStartsService_notOButTargetingO[22]
com.google.firebase.iid.FirebaseInstanceIdWithFcmReceiverRoboTest ‑ testStartsService_notOButTargetingO[23]
…
com.google.firebase.TimestampTest ‑ testCompare
com.google.firebase.TimestampTest ‑ testFromDate
com.google.firebase.TimestampTest ‑ testRejectBadDates
com.google.firebase.TimestampTest ‑ testTimestampParcelable
com.google.firebase.firestore.AggregateQuerySnapshotTest ‑ createWithCountShouldReturnInstanceWithTheGivenQueryAndCount
com.google.firebase.firestore.AggregateQueryTest ‑ testSourceMustNotBeNull
com.google.firebase.firestore.BlobTest ‑ testComparison
com.google.firebase.firestore.BlobTest ‑ testEquals
com.google.firebase.firestore.BlobTest ‑ testMutableBytes
com.google.firebase.firestore.CollectionReferenceTest ‑ testEquals
…

♻️ This comment has been updated with latest results.

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Jul 7, 2023

Size Report 1

Affected Products

  • firebase-firestore

    TypeBase (4d1cc39)Merge (05fe38b)Diff
    aar1.36 MB1.36 MB+908 B (+0.1%)
    apk (release)3.95 MB3.95 MB+668 B (+0.0%)

Test Logs

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/frEKAy1Jb7.html

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Jul 7, 2023

Startup Time Report 1

Note: Layout is sometimes suboptimal due to limited formatting support on GitHub. Please check this report on GCS.

Notes

Startup Times

  • fire-fst

    DeviceStatisticsDistributions
    oriole-32
    Percentile4d1cc3905fe38bDiffSignificant (?)
    p10325 ±19 μs325 ±9 μs-571 ns (-0.2%)NO
    p25340 ±21 μs337 ±14 μs-2.50 μs (-0.7%)NO
    p50360 ±32 μs365 ±34 μs+4.67 μs (+1.3%)NO
    p75395 ±59 μs434 ±82 μs+38.3 μs (+9.7%)NO
    p90452 ±117 μs572 ±178 μs+120 μs (+26.4%)NO

    20 test runs in comparison
    CommitTest Runs
    4d1cc39
    • 2023-07-11_20:46:15.787298_iVgi
    • 2023-07-11_20:46:15.790597_mFVb
    • 2023-07-11_20:46:15.790617_vqYw
    • 2023-07-11_20:46:15.790625_PWnY
    • 2023-07-11_20:46:15.790633_aYqd
    • 2023-07-11_20:46:15.790732_vLrc
    • 2023-07-11_20:46:15.790741_eGlR
    • 2023-07-11_20:46:15.790747_dLZh
    • 2023-07-11_20:46:15.790754_cdsX
    • 2023-07-11_20:46:15.790760_gpFg
    05fe38b
    • 2023-07-13_15:04:39.419713_paAS
    • 2023-07-13_15:04:39.426916_scub
    • 2023-07-13_15:04:39.426927_mQhG
    • 2023-07-13_15:04:39.427063_DZav
    • 2023-07-13_15:04:39.427069_LZMj
    • 2023-07-13_15:04:39.427075_RDnZ
    • 2023-07-13_15:04:39.427081_JnDe
    • 2023-07-13_15:04:39.427086_PATe
    • 2023-07-13_15:04:39.427092_xWOs
    • 2023-07-13_15:04:39.427098_ilui
    redfin-30
    Percentile4d1cc3905fe38bDiffSignificant (?)
    p10607 ±26 μs626 ±28 μs+19.4 μs (+3.2%)NO
    p25623 ±33 μs645 ±31 μs+22.0 μs (+3.5%)NO
    p50649 ±39 μs670 ±32 μs+21.7 μs (+3.3%)NO
    p75691 ±56 μs706 ±33 μs+14.8 μs (+2.1%)NO
    p90749 ±85 μs752 ±44 μs+3.01 μs (+0.4%)NO

    20 test runs in comparison
    CommitTest Runs
    4d1cc39
    • 2023-07-11_20:46:15.787298_iVgi
    • 2023-07-11_20:46:15.790597_mFVb
    • 2023-07-11_20:46:15.790617_vqYw
    • 2023-07-11_20:46:15.790625_PWnY
    • 2023-07-11_20:46:15.790633_aYqd
    • 2023-07-11_20:46:15.790732_vLrc
    • 2023-07-11_20:46:15.790741_eGlR
    • 2023-07-11_20:46:15.790747_dLZh
    • 2023-07-11_20:46:15.790754_cdsX
    • 2023-07-11_20:46:15.790760_gpFg
    05fe38b
    • 2023-07-13_15:04:39.419713_paAS
    • 2023-07-13_15:04:39.426916_scub
    • 2023-07-13_15:04:39.426927_mQhG
    • 2023-07-13_15:04:39.427063_DZav
    • 2023-07-13_15:04:39.427069_LZMj
    • 2023-07-13_15:04:39.427075_RDnZ
    • 2023-07-13_15:04:39.427081_JnDe
    • 2023-07-13_15:04:39.427086_PATe
    • 2023-07-13_15:04:39.427092_xWOs
    • 2023-07-13_15:04:39.427098_ilui
  • timeToInitialDisplay

    DeviceStatisticsDistributions
    oriole-32
    Percentile4d1cc3905fe38bDiffSignificant (?)
    p10202 ±7 ms206 ±3 ms+3.44 ms (+1.7%)NO
    p25209 ±8 ms211 ±4 ms+2.08 ms (+1.0%)NO
    p50217 ±8 ms220 ±4 ms+2.75 ms (+1.3%)NO
    p75226 ±8 ms229 ±4 ms+3.58 ms (+1.6%)NO
    p90233 ±7 ms242 ±7 ms+9.13 ms (+3.9%)NO

    20 test runs in comparison
    CommitTest Runs
    4d1cc39
    • 2023-07-11_20:46:15.787298_iVgi
    • 2023-07-11_20:46:15.790597_mFVb
    • 2023-07-11_20:46:15.790617_vqYw
    • 2023-07-11_20:46:15.790625_PWnY
    • 2023-07-11_20:46:15.790633_aYqd
    • 2023-07-11_20:46:15.790732_vLrc
    • 2023-07-11_20:46:15.790741_eGlR
    • 2023-07-11_20:46:15.790747_dLZh
    • 2023-07-11_20:46:15.790754_cdsX
    • 2023-07-11_20:46:15.790760_gpFg
    05fe38b
    • 2023-07-13_15:04:39.419713_paAS
    • 2023-07-13_15:04:39.426916_scub
    • 2023-07-13_15:04:39.426927_mQhG
    • 2023-07-13_15:04:39.427063_DZav
    • 2023-07-13_15:04:39.427069_LZMj
    • 2023-07-13_15:04:39.427075_RDnZ
    • 2023-07-13_15:04:39.427081_JnDe
    • 2023-07-13_15:04:39.427086_PATe
    • 2023-07-13_15:04:39.427092_xWOs
    • 2023-07-13_15:04:39.427098_ilui
    redfin-30
    Percentile4d1cc3905fe38bDiffSignificant (?)
    p10242 ±3 ms271 ±6 ms+29.2 ms (+12.1%)YES
    p25248 ±3 ms278 ±6 ms+30.0 ms (+12.1%)YES
    p50255 ±3 ms287 ±6 ms+31.5 ms (+12.3%)YES
    p75264 ±3 ms297 ±7 ms+33.5 ms (+12.7%)YES
    p90273 ±4 ms313 ±11 ms+40.0 ms (+14.6%)MAYBE

    20 test runs in comparison
    CommitTest Runs
    4d1cc39
    • 2023-07-11_20:46:15.787298_iVgi
    • 2023-07-11_20:46:15.790597_mFVb
    • 2023-07-11_20:46:15.790617_vqYw
    • 2023-07-11_20:46:15.790625_PWnY
    • 2023-07-11_20:46:15.790633_aYqd
    • 2023-07-11_20:46:15.790732_vLrc
    • 2023-07-11_20:46:15.790741_eGlR
    • 2023-07-11_20:46:15.790747_dLZh
    • 2023-07-11_20:46:15.790754_cdsX
    • 2023-07-11_20:46:15.790760_gpFg
    05fe38b
    • 2023-07-13_15:04:39.419713_paAS
    • 2023-07-13_15:04:39.426916_scub
    • 2023-07-13_15:04:39.426927_mQhG
    • 2023-07-13_15:04:39.427063_DZav
    • 2023-07-13_15:04:39.427069_LZMj
    • 2023-07-13_15:04:39.427075_RDnZ
    • 2023-07-13_15:04:39.427081_JnDe
    • 2023-07-13_15:04:39.427086_PATe
    • 2023-07-13_15:04:39.427092_xWOs
    • 2023-07-13_15:04:39.427098_ilui

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/pYiXkjYJR5/index.html

@dconeybe dconeybe marked this pull request as ready for review July 7, 2023 03:53
@dconeybe dconeybe requested a review from milaGGL July 7, 2023 03:53
Copy link
Contributor

@milaGGL milaGGL left a comment

Choose a reason for hiding this comment

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

LGTM

@dconeybe dconeybe merged commit 800d290 into master Jul 14, 2023
@dconeybe dconeybe deleted the dconeybe/BloomFilterUnicodeTestSimplification branch July 14, 2023 16:44
@firebase firebase locked and limited conversation to collaborators Aug 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants