Skip to content

Conversation

@mpospese
Copy link
Contributor

Introduction

Recently we've had one flaky unit test that's been acting up. We should fix its behavior.

Purpose

Fix #9 flaky unit test (testing behavior of cancel on background upload request).

Scope

  • Add variable to URLProtocolStubNetworkEngine to turn off automatically resuming background tasks immediately after submitting them.
  • Modify cancel test for background upload task
  • Modify cancel test for background download task

Discussion

The download manager cancel test had not (yet) been flaky, but we should probably adopt the same behavior for both tests.
I also set the tests to execute in random order (this should already have been the case).

📈 Coverage

Code

94.4%

image

Documentation

100%

image

@mpospese mpospese self-assigned this Mar 13, 2023
@mpospese mpospese linked an issue Mar 13, 2023 that may be closed by this pull request
@mpospese mpospese merged commit 0d1d3b6 into main Mar 14, 2023
@mpospese mpospese deleted the issue/9-fix-flaky-unit-test branch March 14, 2023 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Fix flaky unit test

4 participants