-
Notifications
You must be signed in to change notification settings - Fork 99
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
Conversation
retest this please |
|
||
wipe_temp_dir() | ||
|
||
from Ganga.Utility.Config import setConfigOption | ||
setConfigOption('Configuration', 'gangadir', '/tmp/ganga_topdir-$USER') |
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.
For this to work, you need to shift the wipe_temp_dir
call as well. That's what's causing the test failures.
this could be revealing of an uncaught bug:
|
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. |
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)) |
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.
Is this change supposed to be a part of this PR?
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.
yes because the test is broken without this
Go for merge from me. |
* Fixing big in way that tests initialize the config.
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
overextra_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.