Skip to content

Update .travis.yml #325

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

Closed
wants to merge 21 commits into from
Closed

Update .travis.yml #325

wants to merge 21 commits into from

Conversation

flovilmart
Copy link
Contributor

No description provided.

@flovilmart flovilmart changed the base branch from travis to master June 20, 2017 20:56
@montymxb
Copy link
Contributor

This looks good, once I figure out the missing modules I'll close out #324 and update parse-server-test accordingly. We can rerun this then and make sure everything looks good.

@montymxb
Copy link
Contributor

montymxb commented Jun 20, 2017

Ok this looks much better than the prior, guess 6.0 was not correct then?

Forgot to mention npm start ends up as a blocking call, so you can receive feedback from the server in realtime as tests are running. We'll have to background it in order to let the tests proceed.

@flovilmart
Copy link
Contributor Author

yep I missed an &

@montymxb
Copy link
Contributor

:/ we're racing ahead of the server starting up. I'm going to modify the parse-sever-test to log out to a file instead of blocking. After that we can bring this back to the foreground and we should be good.

Copy link
Contributor

@montymxb montymxb left a comment

Choose a reason for hiding this comment

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

I'll wait to see how this fares. If it's still problematic I'll make the aforementioned change to the test server.

@flovilmart
Copy link
Contributor Author

perhaps the process is killed as well

@montymxb
Copy link
Contributor

I wouldn't sweat it. I'm just working on making sure I can kill the server after it backgrounds so it doesn't end up floating away into the system. Once that's good it should work as expected, without blocking and without us having to do anything hacky.

@flovilmart
Copy link
Contributor Author

@montymxb Looks like it's gonna work in the end!

@montymxb
Copy link
Contributor

montymxb commented Jun 20, 2017

Oh no kidding. Well I just published 1.0.3 of parse-server-test. Running npm start will no longer block, and since I couldn't find an async way of booting parse-server and waiting on it to finish I went ahead and waited on the process id to write out upon completion. Even with the server in the background we can reliably block until it has finished starting up, after which the output normally destined for the console logs to a file.

With this in place we can go ahead and remove everything except npm start, no need to handle much else 👍 . As for shutting down we should npm stop which will then read that PID and wrap the server up, as well as mongo. I'm not sure how Travis handles their instances internally, if it's just spinning up and shutting down there's not need to cleanup, but if they persist we probably will want to cleanup.

I see you just got it to pass though! Well although this setup works it would be ideal to simplify it. What do you think?

@flovilmart
Copy link
Contributor Author

Also the mongodb-runner that need to download the DB. Did you make that blocking still ? like in a pre-start?

@montymxb
Copy link
Contributor

montymxb commented Jun 20, 2017

@flovilmart mongodb-runner blocks until it's finished downloading/starting, but nothing beyond that. It's just parse-server that blocks once it's done booting up. However all things aside I took your node version 6.11 over to #324 and that's passing now. So now it's a matter of deciding which approach we would prefer. My only beef here is the 10 second sleep, if it takes a bit longer than that we might see some intermittent failures :/

@flovilmart
Copy link
Contributor Author

Your branch seems to be A1, I can close that, it was for experiments!

@flovilmart flovilmart closed this Jun 20, 2017
@flovilmart flovilmart deleted the travis-test branch June 20, 2017 22:48
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.

2 participants