Skip to content
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

Fix flaky testProfilerMutationDuringSlicing #3910

Open
philipphofmann opened this issue Apr 26, 2024 · 2 comments
Open

Fix flaky testProfilerMutationDuringSlicing #3910

philipphofmann opened this issue Apr 26, 2024 · 2 comments

Comments

@philipphofmann
Copy link
Member

GitHub action Run Link

https://github.com/getsentry/sentry-cocoa/actions/runs/8844626847/job/24286898382

Disabling PR

#3909

Description

No response

@armcknight
Copy link
Member

armcknight commented Apr 26, 2024

This test is highly questionable IMO, we're just jamming a bunch of concurrent slice and mutate operations together and hoping nothing bad happens, but it's not deterministic.

In order to deterministically test that, we'd need to add a hook into the slice operation that allows us to mutate the data structures.

I know there's not much appetite for conditionally compiled test logic, but that seems like that's what's going to have to happen if we want to test this deterministically.

Ofc this is not why the test flaked in this instance; the 50 concurrent operations were not able to complete in 1 second so the expectation timed out. I'm not very inclined to just bump it to 2 and call it a day, though. It doesn't make much sense that it couldn't mutate a data structure in ~20ms (the mutations are on their own serial queue–1000ms/50ms=20ms) or compute 50 slices (those ops are on a concurrent queue, no less).

@philipphofmann
Copy link
Member Author

@armcknight, could it be that this test will become obsolete because the logic it tests will become obsolete with continuous profiling? If yes, I wouldn't fix it but delete it at some point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Backlog
Development

No branches or pull requests

2 participants