Skip to content

Commit

Permalink
❄️ Flaky tests (#39877)
Browse files Browse the repository at this point in the history
* Attempt at deflaking amp-consent tests
* Disable flaky test
* Disable flaky test
  • Loading branch information
danielrozenberg committed Mar 6, 2024
1 parent fa38954 commit 773b80a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion extensions/amp-analytics/0.1/test/test-events.js
Original file line number Diff line number Diff line change
Expand Up @@ -1394,7 +1394,8 @@ describes.realWin('Events', {amp: 1}, (env) => {
});
});

it(
// TODO(#39879): fix this flaky test.
it.skip(
'timers started and stopped by the same event on the same target' +
' do not have race condition problems',
() => {
Expand Down
3 changes: 2 additions & 1 deletion extensions/amp-base-carousel/0.1/test-e2e/test-carousel.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ describes.endtoend(
await expect(slidesRects[0].width).to.equal(pageWidth);
});

it('should layout the two adjacent slides', async function () {
// TODO(#24195): fix this flaky test.
it.skip('should layout the two adjacent slides', async function () {
const [firstSlideRect, secondSlideRect, lastSlideRect] = [
await controller.getElementRect(await getSlide(controller, 0)),
await controller.getElementRect(await getSlide(controller, 1)),
Expand Down
4 changes: 2 additions & 2 deletions extensions/amp-consent/0.1/test/test-amp-consent.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {xhrServiceForTesting} from '#service/xhr-impl';

import {dev, user} from '#utils/log';

import {macroTask} from '#testing/helpers';
import {macroTask, sleep} from '#testing/helpers';

import {
registerServiceBuilder,
Expand Down Expand Up @@ -1161,7 +1161,7 @@ describes.realWin(

beforeEach(async () => {
ampConsent.buildCallback();
await macroTask();
await sleep(50);
managerSpy = env.sandbox.spy(
ampConsent.consentStateManager_,
'updateConsentInstancePurposes'
Expand Down

0 comments on commit 773b80a

Please sign in to comment.