-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
test: make guard dog death tests run first always #717
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.
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. |
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.
LGTM
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 ```
## 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>
## 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>
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.