Split Play tests / upgrade non-DB tests to Play 2.3#883
Split Play tests / upgrade non-DB tests to Play 2.3#883hamiltont merged 6 commits intoTechEmpower:masterfrom
Conversation
richdougherty
commented
Jun 25, 2014
- Split the DB tests out of play-scala and play-scala and into new tests. There are already several separate DB tests so this makes things more consistent. ebean and anorm shouldn't be treated differently from jpa, slick, etc.
- Download sbt so that Play 2.3 can use it.
- Update the non-DB tests to Play 2.3.0. We will need to update the DB tests too, but that's a big job that can be done separately. I'm going to ask the community if they can help with updating the DB tests.
|
Can this be included in Round 10? There are quite a few other Play tests that will need to be upgraded to Play 2.3, but I'd like to get the minimal play-scala and play-java tests working properly, and then ask the community for assistance with upgrading the rest. By the way, I don't have a proper test environment so I'm not 100% sure that my script changes are correct. Sorry if I've made some mistakes. I wrote a small test driver to test my setup.py changes so hopefully they will work properly at least. I'm testing on Mac OS so I haven't tested under Windows either. |
|
Hi @richdougherty. Yes, we'll aim to get this merged in before Round 10. The other guys over here are making their way through the pull requests presently and will likely get here soon. They may have some questions for you when they get started on this one. |
There was a problem hiding this comment.
This should be called play-scala-anorm, not play2.
|
@richdougherty since I'm the evil author of 900 and 915, I'll make a pass and note all the areas you need to change. It's going to be a lot of very minor changes mostly intended to allow us to remove the hard-coded dependence on |
There was a problem hiding this comment.
After you rebase onto master, you'll note that all of these now use the IROOT variable, so you'll want to update this to export SBT_HOME=$IROOT/sbt
|
@richdougherty This is an awesome set of changes! I've finished my pass, there were only a few minor things. If you will rebase this onto our master, and update the |
|
@hamiltont, sorry about the delay getting around to this, I've been in the middle of something else. It's rebased now, lets see if it passes validation. It's great to have CI for PRs. :) I moved the install of sbt into A question about |
It's been two months on our end, so I guess you're forgiven :-)
Looks good to me, thanks for that. It may break a few other tests that have hard-coded the path, but I would prefer to break them so we can find+fix their errors. Your verify will take longer than normal because you modified the
I frankly don't know...... ping @msmith-techempower ? |
|
Cool thanks. I see it was @msmith-techempower who commented on the benchmark_config files. |
BTW I noticed that the unfiltered test embeds sbt somehow, maybe that's something to refactor at some point. |
There was a problem hiding this comment.
Should, but does is not explicitly required, I believe, match the folder-name of this test/framework - this appears to be correct, to my eyes.
I left some comments in one of your In a perfect world, I think that there would simply be a |
If that happened I would love @richdougherty - It provides substantial benefits to other aspects of this project |
|
Here is that gist -- the non-complete version of all the |
|
@msmith-techempower, how does Maybe I need more than one setup file, e.g. Of course I could refactor these setup files to be very minimal, and put common code in something like |
|
@richdougherty In this hypothetical, all of the At the moment setup.py does not have a reliable method to know which test it is running, so a common scheme is to create multiple setup files, calling them something like |
Yea, unfortunately this is the current state. While you can probably get one Edit: Oops, I replied before I finished reading your message. You had already figured it out... |
|
OK, updated. I'm using a script called |
|
I don't think that this is working because we are forcibly importing the The easiest way to ensure that this isn't the problem is to copypasta the base setup file over and over again and name each the specific |
|
I will just code generate duplicate code for all the setup files if I need to, but I don't think that's the problem. It looks like the What's the recommended way to get the path to the test directory? I'll try using Note: I'm adding a commit to disable lots of the Travis testing, to make PR validation faster. We obviously don't want to disable the tests, so I'll remove the commit once play2 is working. Unitil then, don't merge this PR! :) |
|
you can use |
roger that. Also, the following few excerpts from the main readme (recently updated) will be helpful: Use a personal Travis-CI account: This is mainly for your own sanity. Our main Travis-CI can occasionally become clogged with so many pull requests that it takes a day to finish all the builds. If you create a fork and enable Travis-CI.org, you will get your own build queue. This means 1) only your commits/branches are being verified, so there is no delay waiting for an unrelated pull request, and 2) you can cancel unneeded items. This does not affect our own Travis-CI setup at all - any commits added to a pull request will be verifed as normal. Setup is as simple as going to travis-ci.org, using the Log in with Github button, and enabling Travis-CI for your fork. All commit pushes will be automatically verified by Travis-CI, and you will get full log output. |
|
OK, I'm getting further now—now it looks like it can't find sbt on the path. Great idea with using my own Travis account. |
|
I think you can find an sbt binary inside |
The directory was previously called 'play-java' and the display name was 'play-java-ebean'. They are now split as follows: * a non-database part with a directory and display name of 'play-java'. * a database/ebean part with a directory and display name of 'play-java-ebean'.
The directory was previously called 'play-scala' and the display name was 'play-scala-anorm'. They are now split as follows: * a non-database part with a directory and display names of 'play-scala' and 'play-scala-windows'. * a database/anorm part with a directory and display names of 'play-scala-anorm' and `play-scala-anorm-windows'.
All these tests use Play 2.3. Setup and configuration is standardised and generated by the `generate_config.py` script. In the future some of the other Play 2 tests could be moved into this directory.
- Single query tests should return a JSON object not a list - Multiple query tests should perform query count parameter conversion - Run sequential queries immediately in the same thread
|
The sbt problem was caused by I'm still using absolute paths for all my commands, even though they're on probably the Using my personal Travis CI worked well for me, although I did get some errors caused by Once I got everything working in a single directory your new verification code found several problems. I fixed these errors too. This PR is now ready to merge, if you're happy with it. |
Yea, I've fixed those up in our master. That part is quite tricky and error prone, stubbing it out for testing is totally fine.
Amazing!!
I've pulled this and run some of the tests myself. You get a tentative LGTM, and if travis agree's I'll merge it tonight. Can't thank you enough for the help PS - while you're here, let me ask you this...where do I put all the other play-* tests? We now have a play1 and a play2 directory, which makes sense to me. Should all of the other play-* items be merged into those two eventually or are there differences? e.g. play-activate-mysql, play-scala-mongodb, etc. I have no idea if these are play1 or play2 or something entirely different |
|
Looks like play2 passed! It'd be great if you can merge this. I've written up a TODO document of the further work needed for the Play 2 tests. I don't have time to do this myself unfortunately. I was thinking of asking on the Play Framework mailing list to see if anyone wants to step up and maintain the tests. I'll wait until you merge before I send my message. |
|
Awesome, this LGTM, I'll merge soon. Thank you for this help!!! PS - could you hold off on sending that message until tomorrow sometime? I hope to have #1015 merged in by then, which will make the project a lot easier for new people to navigate |
Play2: Upgrade non-DB tests to Play 2.3
|
Great, I'm happy to have that merged. :) I can send that message on Monday if you like. |
|
That would actually be great, I'll have a nice buffer of time to finish my |
|
@richdougherty Feel free to send the message whenever, my big PR is closed. Also, I realized during it that I completely shot myself in the foot by asking you to merge the play scala and java tests. I ended up refactoring it minorly just because I needed them in separate directories here. Sorry about that!!! On the plus side, now the code for both those tests is great ;-) |