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

Flaky Tests Invalid server state: initialized #9149

Open
dplewis opened this issue Jun 7, 2024 · 6 comments · Fixed by parse-community/Parse-SDK-JS#2183
Open

Flaky Tests Invalid server state: initialized #9149

dplewis opened this issue Jun 7, 2024 · 6 comments · Fixed by parse-community/Parse-SDK-JS#2183
Labels
type:ci CI related issue

Comments

@dplewis
Copy link
Member

dplewis commented Jun 7, 2024

New Issue Checklist

Issue Description

The test suite in this repo and in the JS SDK both have flaky tests. I believe this is due to the asyncronous nature of starting the server instance.

await ParseServer.startApp(newConfiguration);

I think the issue is after the promise resolves the server is still initializing. #8232

Parse.Query testing dontSelect query without conditions
  - Unhandled promise rejection: ParseError: 111 Invalid server state: initialized,ParseError: 111 Invalid server state: initialized,ParseError: 111 Invalid server state: initialized,ParseError: 111 Invalid server state: initialized,ParseError: 111 Invalid server state: initialized  

Steps to reproduce

I can't reproduce this locally

Actual Outcome

Tests fail

Expected Outcome

Test Pass

Copy link

parse-github-assistant bot commented Jun 7, 2024

Thanks for opening this issue!

  • 🚀 You can help us to fix this issue faster by opening a pull request with a failing test. See our Contribution Guide for how to make a pull request, or read our New Contributor's Guide if this is your first time contributing.

@mtrezza mtrezza added the type:bug Impaired feature or lacking behavior that is likely assumed label Jun 11, 2024
@mtrezza
Copy link
Member

mtrezza commented Jun 11, 2024

So initialized is the state after calling the ParseServer constructor. As soon as you call start() on the instance, the state changes to starting. From what you describe it looks like start() has not been called at all, because starting is set synchronously after calling start(). So it may be related to the reconfigureServer logic; that promise may return early, rather than the server init itself. Which would be good, because that means it's only a testing issue, not a server issue.

@mtrezza mtrezza added type:ci CI related issue and removed type:bug Impaired feature or lacking behavior that is likely assumed labels Jun 11, 2024
@mtrezza
Copy link
Member

mtrezza commented Jun 28, 2024

Closing via parse-community/Parse-SDK-JS#2183

@mtrezza mtrezza closed this as completed Jun 28, 2024
@mtrezza mtrezza reopened this Jun 28, 2024
@mtrezza
Copy link
Member

mtrezza commented Jun 28, 2024

Re-opened, I think we first need to upgrade the Parse JS SDK in Parse Server to see whether the Parse Server CI shows less flakiness.

@dplewis
Copy link
Member Author

dplewis commented Jun 28, 2024

I agree, I still don’t know why this is happening. I would like to think I solved it on the JS SDK

IMG_0502

@mtrezza
Copy link
Member

mtrezza commented Jun 30, 2024

Issue still occurs in recent PRs; I have never seen this before; is this a recently introduced issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:ci CI related issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants