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
Double duration of awaitFinalized in ShadowThemeTest #8481
Double duration of awaitFinalized in ShadowThemeTest #8481
Conversation
Looks like shouldFreeNativeObjectInRegistry becomes flaky with JDK17 sometimes on GitHub Actions. Signed-off-by: utzcoz <utzcoz@outlook.com>
cc @hoisie . |
From testing result, looks like this PR reduces the flaky percentage, but this test case also flaky. @hoisie Maybe you can help to select a higher duration? |
Guava has GCfinalization.awaitClear, maybe that works better? We can also move this to MemoryLeaksTest which generates an hprof when run inside Google. |
@hoisie I can give a try tomorrow. I just updated it again to 15s to make everything stable, at least it is stable with my some PRs testing. |
@hoisie |
This test was still flaky so I moved it to MemoryLeaksTest: c90c030 Internally at Google I ran it thousands of times and there wasn't a single flake. I'll keep an eye on it. |
@hoisie I think it is only flaky when running it on GitHub Actions environment. Maybe it is related to GitHub Actions environment's restriction as objects are recycled very late than expected not leaked. At least, we can retrigger it if flaky on GitHub Actions. |
@utzcoz MemoryLeaksTest seems to run reliably on GitHub CI. That test uses Guava's GCFinalization assertions. I assume that Guava's GCFinalization probably handles some subtle edge cases that were not handled by the |
In retrospect this may actually be a race condition. I know calling |
@hoisie Maybe. The test suite of the memoryleak module is not large, and maybe it will cause flaky issues as you said. Could you merge google branch into master branch recently? I want the master branch to benefit from this change too. |
Looks like
shouldFreeNativeObjectInRegistry
becomes flaky with JDK17 sometimes on GitHub Actions.