Skip to content

Deflake firebase_common HeartBeat tests. #4083

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 1 commit into from
Sep 14, 2022
Merged

Conversation

vkryachko
Copy link
Member

The tests relied on TestOnCompleteListener that was not safe to call more than once since it was based on a count down latch. So reusing it multiple times would cause await() to return immediately.

This change makes it so that a new latch is created for every await() call, making all await() calls work.

Fixes: http://b/245956774

The tests relied on `TestOnCompleteListener` that was not safe to call
more than once since it was based on a count down latch. So reusing it
multiple times would cause await() to return immediately.

This change makes it so that a new latch is created for every await()
call, making all await() calls work.

Fixes: http://b/245956774
@google-oss-bot
Copy link
Contributor

1 Warning
⚠️ Did you forget to add a changelog entry? (Add the 'no-changelog' label to the PR to silence this warning.)

Generated by 🚫 Danger

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Sep 13, 2022

Coverage Report 1

Affected Products

  • firebase-common

    Overall coverage changed from ? (e6226b7) to 66.49% (2c5db4b) by ?.

    32 individual files with coverage change

    FilenameBase (e6226b7)Merge (2c5db4b)Diff
    AutoValue_HeartBeatResult.java?33.33%?
    AutoValue_LibraryVersion.java?58.33%?
    AutoValue_SdkHeartBeatResult.java?0.00%?
    ComponentDiscoveryService.java?0.00%?
    ComponentMonitor.java?100.00%?
    DataCollectionConfigStorage.java?88.89%?
    DataCollectionDefaultChange.java?100.00%?
    DefaultHeartBeatController.java?94.12%?
    DefaultUserAgentPublisher.java?95.45%?
    EmulatedServiceSettings.java?0.00%?
    FirebaseApp.java?55.71%?
    FirebaseAppLifecycleListener.java?0.00%?
    FirebaseCommonRegistrar.java?95.74%?
    FirebaseError.java?0.00%?
    FirebaseInitProvider.java?58.82%?
    FirebaseNetworkException.java?0.00%?
    FirebaseOptions.java?31.94%?
    FirebaseTooManyRequestsException.java?0.00%?
    FirebaseTrace.java?100.00%?
    GlobalLibraryVersionRegistrar.java?75.00%?
    HeartBeatConsumer.java?0.00%?
    HeartBeatConsumerComponent.java?0.00%?
    HeartBeatController.java?0.00%?
    HeartBeatInfo.java?100.00%?
    HeartBeatInfoStorage.java?90.57%?
    HeartBeatResult.java?100.00%?
    KotlinDetector.java?66.67%?
    LibraryVersion.java?100.00%?
    LibraryVersionComponent.java?100.00%?
    PublicApi.java?0.00%?
    SdkHeartBeatResult.java?0.00%?
    UserAgentPublisher.java?0.00%?

Test Logs

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

@github-actions
Copy link
Contributor

github-actions bot commented Sep 13, 2022

Unit Test Results

   339 files  +   339     339 suites  +339   15m 33s ⏱️ + 15m 33s
4 292 tests +4 292  4 270 ✔️ +4 270  22 💤 +22  0 ±0 
4 308 runs  +4 308  4 286 ✔️ +4 286  22 💤 +22  0 ±0 

Results for commit b4032e3. ± Comparison against base commit e6226b7.

♻️ This comment has been updated with latest results.

@google-oss-bot
Copy link
Contributor

Size Report 1

Affected Products

  • firebase-common

    TypeBase (e6226b7)Merge (2c5db4b)Diff
    aar50.1 kB50.2 kB+49 B (+0.1%)
    apk (aggressive)85.1 kB85.1 kB+48 B (+0.1%)
    apk (release)683 kB683 kB+36 B (+0.0%)

Test Logs

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

@google-oss-bot
Copy link
Contributor

@vkryachko vkryachko merged commit 39930de into master Sep 14, 2022
@vkryachko vkryachko deleted the vk.common_deflake branch September 14, 2022 17:29
kaibolay added a commit that referenced this pull request Sep 15, 2022
* Deflake firebase_common HeartBeat tests. (#4083)

The tests relied on `TestOnCompleteListener` that was not safe to call
more than once since it was based on a count down latch. So reusing it
multiple times would cause await() to return immediately.

This change makes it so that a new latch is created for every await()
call, making all await() calls work.

Fixes: http://b/245956774

* Add Javadoc support to the DackkaPlugin (#4082)

* Add util method for copying directories

* Add javadoc support to our dackka plugin

* Remove the extension check on fromDirectory

* Add a note about cache compliance and the javadoc task

* Add reference to kotlin stdlib package list (#4093)

Co-authored-by: Vladimir Kryachko <[email protected]>
Co-authored-by: Daymon <[email protected]>
kaibolay added a commit that referenced this pull request Sep 15, 2022
* Minor updates to the App Distribution test app. (#4088)

* Update various versions (#4090)

* Updated various versions (dependencies and SDK to fix Android resource linking failure (AAPT: error: resource android:attr/lStar not found.)

* Update compileSdk/targetSdkVersion from 31 to 33

* Update with latest changes from master (#4091)

* Deflake firebase_common HeartBeat tests. (#4083)

The tests relied on `TestOnCompleteListener` that was not safe to call
more than once since it was based on a count down latch. So reusing it
multiple times would cause await() to return immediately.

This change makes it so that a new latch is created for every await()
call, making all await() calls work.

Fixes: http://b/245956774

* Add Javadoc support to the DackkaPlugin (#4082)

* Add util method for copying directories

* Add javadoc support to our dackka plugin

* Remove the extension check on fromDirectory

* Add a note about cache compliance and the javadoc task

* Add reference to kotlin stdlib package list (#4093)

Co-authored-by: Vladimir Kryachko <[email protected]>
Co-authored-by: Daymon <[email protected]>

Co-authored-by: Lee Kellogg <[email protected]>
Co-authored-by: Vladimir Kryachko <[email protected]>
Co-authored-by: Daymon <[email protected]>
kaibolay added a commit that referenced this pull request Sep 15, 2022
* Deflake firebase_common HeartBeat tests. (#4083)

The tests relied on `TestOnCompleteListener` that was not safe to call
more than once since it was based on a count down latch. So reusing it
multiple times would cause await() to return immediately.

This change makes it so that a new latch is created for every await()
call, making all await() calls work.

Fixes: http://b/245956774

* Add Javadoc support to the DackkaPlugin (#4082)

* Add util method for copying directories

* Add javadoc support to our dackka plugin

* Remove the extension check on fromDirectory

* Add a note about cache compliance and the javadoc task

* Add reference to kotlin stdlib package list (#4093)

Co-authored-by: Vladimir Kryachko <[email protected]>
Co-authored-by: Daymon <[email protected]>
kaibolay added a commit that referenced this pull request Sep 15, 2022
* Minor updates to the App Distribution test app. (#4088)

* Update various versions (#4090)

* Updated various versions (dependencies and SDK to fix Android resource linking failure (AAPT: error: resource android:attr/lStar not found.)

* Update compileSdk/targetSdkVersion from 31 to 33

* Update with latest changes from master (#4091)

* Deflake firebase_common HeartBeat tests. (#4083)

The tests relied on `TestOnCompleteListener` that was not safe to call
more than once since it was based on a count down latch. So reusing it
multiple times would cause await() to return immediately.

This change makes it so that a new latch is created for every await()
call, making all await() calls work.

Fixes: http://b/245956774

* Add Javadoc support to the DackkaPlugin (#4082)

* Add util method for copying directories

* Add javadoc support to our dackka plugin

* Remove the extension check on fromDirectory

* Add a note about cache compliance and the javadoc task

* Add reference to kotlin stdlib package list (#4093)

Co-authored-by: Vladimir Kryachko <[email protected]>
Co-authored-by: Daymon <[email protected]>

* Resolve strict mode violations in firebase-appdistribution (#4092)

* merge master into fad/next (#4102)

* Deflake firebase_common HeartBeat tests. (#4083)

The tests relied on `TestOnCompleteListener` that was not safe to call
more than once since it was based on a count down latch. So reusing it
multiple times would cause await() to return immediately.

This change makes it so that a new latch is created for every await()
call, making all await() calls work.

Fixes: http://b/245956774

* Add Javadoc support to the DackkaPlugin (#4082)

* Add util method for copying directories

* Add javadoc support to our dackka plugin

* Remove the extension check on fromDirectory

* Add a note about cache compliance and the javadoc task

* Add reference to kotlin stdlib package list (#4093)

Co-authored-by: Vladimir Kryachko <[email protected]>
Co-authored-by: Daymon <[email protected]>

Co-authored-by: Lee Kellogg <[email protected]>
Co-authored-by: Vladimir Kryachko <[email protected]>
Co-authored-by: Daymon <[email protected]>
Co-authored-by: emilypgoogle <[email protected]>
qdpham13 pushed a commit that referenced this pull request Sep 20, 2022
The tests relied on `TestOnCompleteListener` that was not safe to call
more than once since it was based on a count down latch. So reusing it
multiple times would cause await() to return immediately.

This change makes it so that a new latch is created for every await()
call, making all await() calls work.

Fixes: http://b/245956774
@firebase firebase locked and limited conversation to collaborators Oct 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants