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

test: Attempt to fix flaky tests for Windows & Android #1441

Merged
merged 44 commits into from
Sep 7, 2023

Conversation

Gustl22
Copy link
Collaborator

@Gustl22 Gustl22 commented Mar 18, 2023

Description

The tests in Windows & Android are possibly flaky for this reason:

The solution to the problem also raises another issue on Android, as the position can not be retrieved on very short sources, thus they are excluded from these tests and it is expected to make it work with Exoplayer (#1526).

Sometimes CI fails, cause Windows needs a long time to finish playing a source with lengths < 2s.
See: https://github.com/bluefireteam/audioplayers/actions/runs/4455910532/jobs/7826010863
This increases the timeout, so onComplete should be called in that time slot.

Checklist

  • The title of my PR starts with a [Conventional Commit] prefix (fix:, feat:, docs:, chore: etc).
  • I have read the [Contributor Guide] and followed the process outlined for submitting PRs.
  • I have updated/added tests for ALL new/updated/fixed functionality.
  • I have updated/added relevant documentation and added dartdoc comments with ///, where necessary.
  • I have updated/added relevant examples in [example].

Breaking Change

  • Yes, this is a breaking change.
  • No, this is not a breaking change.

Related Issues

https://github.com/bluefireteam/audioplayers/actions/workflows/test.yml?query=branch%3Agustl22%2Fincrease-timeout-windows

@Gustl22 Gustl22 marked this pull request as ready for review March 18, 2023 15:56
@Gustl22 Gustl22 marked this pull request as draft March 18, 2023 17:01
@Gustl22
Copy link
Collaborator Author

Gustl22 commented Mar 19, 2023

How debugging this feels like:
image
https://www.reddit.com/r/ProgrammerHumor/comments/ym91d5/me_debugging/

@Gustl22
Copy link
Collaborator Author

Gustl22 commented Mar 20, 2023

Hmm seems like windows does not support IntegrationTestPlugin with captureScreenshot: https://github.com/flutter/flutter/blob/master/packages/integration_test/integration_test_macos/pubspec.yaml
May has to do sth with this: flutter/flutter#111505 ?

@Gustl22
Copy link
Collaborator Author

Gustl22 commented Mar 22, 2023

This only happens if GH is on its limits and takes longer than expected for some tasks... 😪 Very flaky, but hope to fix it some day.

@Gustl22 Gustl22 changed the title test: increase timeout on complete (for Windows) test: attempt to solve flaky tests for Windows Mar 22, 2023
@Gustl22
Copy link
Collaborator Author

Gustl22 commented Apr 20, 2023

Maybe due to: actions/runner-images#7320

@Gustl22 Gustl22 marked this pull request as ready for review May 24, 2023 11:53
@Gustl22 Gustl22 marked this pull request as draft May 28, 2023 12:09
@Gustl22 Gustl22 changed the title test: attempt to solve flaky tests for Windows test: attempt to solve flaky tests for Windows & Android May 28, 2023
@Gustl22 Gustl22 changed the title test: attempt to solve flaky tests for Windows & Android test: attempt to solve flaky tests for Windows Jun 27, 2023
@Gustl22 Gustl22 marked this pull request as ready for review September 7, 2023 08:00
@Gustl22 Gustl22 changed the title test: attempt to solve flaky tests for Windows test: Attempt to fix flaky tests for Windows & Android Sep 7, 2023
@Gustl22 Gustl22 requested a review from spydon September 7, 2023 13:25
@Gustl22 Gustl22 merged commit c5b0b6e into main Sep 7, 2023
7 checks passed
@Gustl22 Gustl22 deleted the gustl22/increase-timeout-windows branch September 7, 2023 13:40
@Gustl22
Copy link
Collaborator Author

Gustl22 commented Sep 17, 2023

Still not fixed according to https://github.com/bluefireteam/audioplayers/actions/runs/6110536581/job/16584118505
But let's see how many times this occurs.

Gustl22 added a commit that referenced this pull request Sep 26, 2023
# Description

The tests in Windows & Android are possibly flaky for this reason:
- In general it is not tested, if a source starts to play for app tests.
- In the app test for `ReleaseMode.loop`, the source starts to play, but
never completes or stops. See:
https://github.com/bluefireteam/audioplayers/blob/fe81f3b1e600fe005febbe7cd3da02735a3de004/packages/audioplayers/example/integration_test/app/tabs/controls_tab.dart#L104
. This is now checked by getting the current position.

The solution to the problem also raises another issue on Android, as the
position can not be retrieved on very short sources, thus they are
excluded from these tests and it is expected to make it work with
Exoplayer (#1526).

(cherry picked from commit c5b0b6e)
Gustl22 added a commit that referenced this pull request Nov 14, 2023
# Description

The tests in Windows & Android are possibly flaky for this reason:
- In general it is not tested, if a source starts to play for app tests.
- In the app test for `ReleaseMode.loop`, the source starts to play, but
never completes or stops. See:
https://github.com/bluefireteam/audioplayers/blob/fe81f3b1e600fe005febbe7cd3da02735a3de004/packages/audioplayers/example/integration_test/app/tabs/controls_tab.dart#L104
. This is now checked by getting the current position.

The solution to the problem also raises another issue on Android, as the
position can not be retrieved on very short sources, thus they are
excluded from these tests and it is expected to make it work with
Exoplayer (#1526).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants