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

Changing config setups #742

Merged
merged 9 commits into from
Sep 5, 2016
Merged

Changing config setups #742

merged 9 commits into from
Sep 5, 2016

Conversation

rob-c
Copy link
Member

@rob-c rob-c commented Aug 19, 2016

This PR guarantees that all of the config changes are applied before any jobs involved in any of the tests are touched by the monitoring code.

This should effect no tests but it does dramatically mess with the new MassStorage ones #735 so I'd advise that all future tests avoid the use of setConfigOption over extra_opts.

This change in behaviour of the Ganga codebase can be traced to when the changes went into the GangaUnitTest around the handling of the configuration parameters. Setting them back to the default value led to some extremely strange behaviour where code would fail for 0.5s then succeed for the next 10sec due to the monitoring code starting up before the setUp methods had finished executing.

@rob-c rob-c added this to the 6.2.0 milestone Aug 19, 2016
@rob-c rob-c self-assigned this Aug 19, 2016
@rob-c
Copy link
Member Author

rob-c commented Aug 21, 2016

retest this please


wipe_temp_dir()

from Ganga.Utility.Config import setConfigOption
setConfigOption('Configuration', 'gangadir', '/tmp/ganga_topdir-$USER')
Copy link
Contributor

Choose a reason for hiding this comment

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

For this to work, you need to shift the wipe_temp_dir call as well. That's what's causing the test failures.

@alexanderrichards alexanderrichards modified the milestones: 6.2.0, 6.1.25 Aug 23, 2016
@rob-c rob-c modified the milestones: 6.2.1, 6.1.25 Aug 23, 2016
@rob-c
Copy link
Member Author

rob-c commented Sep 2, 2016

this could be revealing of an uncaught bug:

>       from Ganga.GPI import jobs
E       ImportError: cannot import name jobs

@rob-c
Copy link
Member Author

rob-c commented Sep 5, 2016

OK, this actually revealed a small bug in the flow of 1 test. Thankfully this doesn't mean that there are any problems with what was mainly being tested and only a few small changes are needed.

@rob-c
Copy link
Member Author

rob-c commented Sep 5, 2016

OK, ready to merge, can someone have a look at this?

@@ -63,8 +61,7 @@ def test_a_JobConstruction(self):

def test_b_TestRemoveSJXML(self):
# Remove XML force to use backup
from Ganga.GPI import jobs
XMLFileName = getSJXMLFile(jobs(0).subjobs(0))
XMLFileName = getSJXMLFile((0, 0))
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this change supposed to be a part of this PR?

Copy link
Member Author

Choose a reason for hiding this comment

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

yes because the test is broken without this

@milliams
Copy link
Contributor

milliams commented Sep 5, 2016

Go for merge from me.

@rob-c rob-c merged commit 5c5b8b2 into develop Sep 5, 2016
@rob-c rob-c deleted the testFixes branch September 5, 2016 12:55
rob-c added a commit that referenced this pull request Sep 16, 2016
* Fixing big in way that tests initialize the config.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants