Skip to content

Fix Parse.Push flaky tests #7263

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

Merged
merged 2 commits into from
Mar 12, 2021
Merged

Fix Parse.Push flaky tests #7263

merged 2 commits into from
Mar 12, 2021

Conversation

dplewis
Copy link
Member

@dplewis dplewis commented Mar 12, 2021

New Pull Request Checklist

Issue Description

There are flaky tests in Parse.Push.spec.js and PushController.spec.js.

  • PushController properly creates _PushStatus
  • PushController should not enqueue push when device token is not set
  • Parse.Push does not get stuck with _PushStatus 'running' on 1 installation added
  • Parse.Push does not get stuck with _PushStatus 'running' on 1 installation removed
  • Many others

Related issue: FILL_THIS_OUT

Approach

  • Ensure a sent push is completed before continuing
  • Remove setTimeout
  • Use async/await
  • Utilize new Parse.Push.getPushStatus

TODOs before merging

  • Add test cases
  • Add entry to changelog
  • Add changes to documentation (guides, repository pages, in-code descriptions)
  • Add security check
  • Add new Parse Error codes to Parse JS SDK
  • ...

@codecov
Copy link

codecov bot commented Mar 12, 2021

Codecov Report

Merging #7263 (51ca146) into master (687f4b7) will increase coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #7263      +/-   ##
==========================================
+ Coverage   94.03%   94.04%   +0.01%     
==========================================
  Files         179      179              
  Lines       13137    13137              
==========================================
+ Hits        12353    12355       +2     
+ Misses        784      782       -2     
Impacted Files Coverage Δ
src/Adapters/Files/GridFSBucketAdapter.js 80.32% <0.00%> (+0.81%) ⬆️
src/ParseServerRESTController.js 98.50% <0.00%> (+1.49%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 687f4b7...51ca146. Read the comment docs.

@dplewis dplewis requested review from davimacedo and mtrezza March 12, 2021 17:59
Copy link
Member

@davimacedo davimacedo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@davimacedo davimacedo merged commit 8b0e8cd into master Mar 12, 2021
@davimacedo davimacedo deleted the push-flaky-test branch March 12, 2021 23:50
Arul- pushed a commit to Arul-/parse-server that referenced this pull request Mar 25, 2021
* Fix Push Notification Flaky Tests

* handle all tests
@parseplatformorg
Copy link
Contributor

🎉 This change has been released in version 5.0.0-beta.1

@parseplatformorg parseplatformorg added the state:released-beta Released as beta version label Nov 1, 2021
@parseplatformorg
Copy link
Contributor

🎉 This change has been released in version 5.0.0

@parseplatformorg parseplatformorg added the state:released Released as stable version label Mar 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state:released Released as stable version state:released-beta Released as beta version
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants