-
Notifications
You must be signed in to change notification settings - Fork 13
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
Ported partner sites feature from ALMA NGAS source code #28
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@smclay thanks for the patches, it looks great :). The build is failing though, apparently because of a small change in one of the messages returned by the server. Could you have a look at that?
I also didn't see any new tests that exercise the new code, do you think you could add one? After we have tests passing in Travis we should get some measurements on code coverage, and could see what parts of the new code are getting hit and which aren't.
I left a few comments across the patch. In general it's really good, and I wonder only if we could reuse some code, specially around the issuing of proxy requests.
Yes,
A good example could be ngas/test/test_subscription.py Lines 261 to 286 in c6556bc
But instead of starting the two servers via a single The |
Until now every time we start an NGAS server during our tests, its sqlite database is stored not under the NGAS root but under a common directory. This path is fixed, and the only flexibility that further server instances have is to point to the same database without re-creating it, but not to point to a different one. This commit changes where the sqlite database is created in different use cases. When starting single NGAS servers, each server gets its own sqlite file created under its root directory, and when a cluster is created (via prepCluster()) a single database file is created. While this adds the ability to start independent servers that are not connected through a common database, this is true only for sqlite-based tests. Tests using other databases will still have the limitation of being connected to the same database instance. If full independence is needed, those tests should run only when the database backend is sqlite.
As discussed via email, the new unit test is now working fine in the sqlite-based tests. The failing tests are expected, as the MySQL and PostgreSQL tests don't support separate, independent servers to be started easily. I will take care of these now, and then I'll merge to the |
This is the partner sites feature that was developed and used by the ALMA observatory. It is very useful and important feature for every day ALMA use in development and testing. It is also useful in production.
I cleaned up the code and refactored it so it is much cleaner than it was on the older NGAS code base. Please let me know if there are any further improvements I can make.
Update:
I forgot to say that the partner site feature is enabled in the NGAS XML configuration by adding the following element...