mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Disable LongTasksAPI on Github CI (#53009)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53009 Changelog: [internal] This disables the test for LongTasks API on Github CI as the execution speed there is unreliable and makes the current tests flaky. This happens because the test is timing dependent, but the alternative would be to mock some core behaviors that I think might be even worse. Reviewed By: cortinico Differential Revision: D79510480 fbshipit-source-id: 277e42e36aa6dfebf4745d094541a667f58a0996
This commit is contained in:
committed by
Facebook GitHub Bot
parent
4289cff268
commit
b708d2da61
+10
@@ -42,6 +42,16 @@ function ensurePerformanceLongTaskTiming(
|
||||
|
||||
let observer: ?PerformanceObserver;
|
||||
|
||||
const constants = Fantom.getConstants();
|
||||
const isGithubCI = constants.isOSS && constants.isRunningFromCI;
|
||||
|
||||
// Skip the test on Github CI.
|
||||
// In that environment, execution speed is unreliable so some of the tasks
|
||||
// we schedule as part of the test run (even the task to report long tasks) are
|
||||
// also being reported as long, and we don't have a way to distinguish those
|
||||
// from the intentionally long tasks we're scheduling for testing.
|
||||
const describe = isGithubCI ? global.describe.skip : global.describe;
|
||||
|
||||
describe('LongTasks API', () => {
|
||||
afterEach(() => {
|
||||
if (observer) {
|
||||
|
||||
Reference in New Issue
Block a user