Skip to content

ci: Fix flaky direct access transaction tests #9235

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 4 commits into from
Jul 21, 2024

Conversation

dplewis
Copy link
Member

@dplewis dplewis commented Jul 20, 2024

Pull Request

Issue

#9210 fixed the transaction flaky test for batch.spec.js. This PR fixes it for the ParseServerRESTConroller

https://github.com/parse-community/parse-server/actions/runs/10019940136/job/27697049679?pr=9218

Copy link

Thanks for opening this pull request!

  • ❌ Please link an issue that describes the reason for this pull request, otherwise your pull request will be closed. Make sure to write it as Closes: #123 in the PR description, so I can recognize it.

Copy link

codecov bot commented Jul 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.76%. Comparing base (4d86ace) to head (ee341fd).
Report is 24 commits behind head on alpha.

Additional details and impacted files
@@            Coverage Diff             @@
##            alpha    #9235      +/-   ##
==========================================
+ Coverage   93.75%   93.76%   +0.01%     
==========================================
  Files         184      184              
  Lines       14675    14715      +40     
==========================================
+ Hits        13758    13797      +39     
- Misses        917      918       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dplewis dplewis requested a review from a team July 20, 2024 15:24
Copy link
Member

@mtrezza mtrezza left a comment

Choose a reason for hiding this comment

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

That's an interesting fix; is it more reliable to reference a spy in a var let createSpy = spyOn... than to set the spy spyOn(databaseAdapter, 'createObject').and.callThrough() and then try to access it via the spied upon obj databaseAdapter.createObject.calls?

@dplewis
Copy link
Member Author

dplewis commented Jul 20, 2024

Using let createSpy = spyOn.. in a beforeEach guarantees the mock resets and allow you to programmatically reset the mocks for finer control of the tests.

@mtrezza mtrezza merged commit 5d09a1f into parse-community:alpha Jul 21, 2024
27 checks passed
@parseplatformorg
Copy link
Contributor

🎉 This change has been released in version 7.3.0-alpha.7

@parseplatformorg parseplatformorg added the state:released-alpha Released as alpha version label Aug 27, 2024
@parseplatformorg
Copy link
Contributor

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

@parseplatformorg parseplatformorg added the state:released-beta Released as beta version label Oct 3, 2024
@parseplatformorg
Copy link
Contributor

🎉 This change has been released in version 7.3.0

@parseplatformorg parseplatformorg added the state:released Released as stable version label Oct 3, 2024
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-alpha Released as alpha version state:released-beta Released as beta version
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants