test: make guard dog death tests run first always#717
Merged
mattklein123 merged 1 commit intomasterfrom Apr 7, 2017
Merged
Conversation
There appears to be a race condition during thread cleanup and fork where pthread_join can return but the thread is still being fully destroyed. This can lead to issues during fork.
Member
Author
Contributor
|
This looks good to me (although I haven't repro'd this specific problem so I can't verify that). I now realize that I had originally confused the definitions of "Test" and "Test Case". It is the test case (group of tests, not individual test name ending in DeathTest) that is run first so you do need to create the trivial derived fixture class with alternate name like you did. |
rshriram
pushed a commit
to rshriram/envoy
that referenced
this pull request
Oct 30, 2018
Automatic merge from submit-queue. [DO NOT MERGE] Auto PR to update dependencies of proxy This PR will be merged automatically once checks are successful. ```release-note none ```
jpsim
pushed a commit
that referenced
this pull request
Nov 28, 2022
## Description This change adds the ability to automatically flush stats based on application lifecycle changes (in addition to the scheduled flushing interval). Enabling this flushing system is done **automatically** when the iOS/Android clients are instantiated. On **iOS**, this is done by observing `NSNotificationCenter`. **Android** requires an `Application` context to use for registering lifecycle callbacks. To accommodate this, the `Application` is now passed in to the Android builder instead of the `Context`. Right now this new stats flushing behavior is enabled by default. In the future, we would like to investigate making it optional using the builder pattern. For example: ```swift EnvoyClientBuilder() .addAppLifecycleHandling() .build() ``` ```kotlin AndroidEnvoyClientBuilder(baseContext) .addAppLifecycleHandling(getApplication()) .build() ``` envoyproxy/envoy-mobile#721 will track this work. As part of this PR, I also updated some documentation to better reflect the differences between Android/Java interfaces and those present on iOS. ## Testing - Tested locally and verified that stats are flushed when backgrounding the iOS and Android sample apps - Sample apps use this new mechanism ## Risk Level Low, this is an additive change. ## Issues Resolves envoyproxy/envoy-mobile#573 Signed-off-by: Michael Rebello <me@michaelrebello.com> Signed-off-by: JP Simard <jp@jpsim.com>
jpsim
pushed a commit
that referenced
this pull request
Nov 29, 2022
## Description This change adds the ability to automatically flush stats based on application lifecycle changes (in addition to the scheduled flushing interval). Enabling this flushing system is done **automatically** when the iOS/Android clients are instantiated. On **iOS**, this is done by observing `NSNotificationCenter`. **Android** requires an `Application` context to use for registering lifecycle callbacks. To accommodate this, the `Application` is now passed in to the Android builder instead of the `Context`. Right now this new stats flushing behavior is enabled by default. In the future, we would like to investigate making it optional using the builder pattern. For example: ```swift EnvoyClientBuilder() .addAppLifecycleHandling() .build() ``` ```kotlin AndroidEnvoyClientBuilder(baseContext) .addAppLifecycleHandling(getApplication()) .build() ``` envoyproxy/envoy-mobile#721 will track this work. As part of this PR, I also updated some documentation to better reflect the differences between Android/Java interfaces and those present on iOS. ## Testing - Tested locally and verified that stats are flushed when backgrounding the iOS and Android sample apps - Sample apps use this new mechanism ## Risk Level Low, this is an additive change. ## Issues Resolves envoyproxy/envoy-mobile#573 Signed-off-by: Michael Rebello <me@michaelrebello.com> Signed-off-by: JP Simard <jp@jpsim.com>
This file contains hidden or 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
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.
There appears to be a race condition during thread cleanup and fork
where pthread_join can return but the thread is still being fully
destroyed. This can lead to issues during fork.