#248: depcheck: simultaneous run may report incorrect results
--------------------+-------------------------------------------------------
Reporter: kparal | Owner: wwoods
Type: task | Status: assigned
Priority: major | Milestone: 0.4.4
Component: tests | Resolution:
Keywords: |
--------------------+-------------------------------------------------------
Comment (by kparal):
The new watcher jskladan is working on should detect any change to
-pending tag (new updates, removed updates, updates pushed live).
Therefore it seems to me that the wrapper can be this simple:
{{{
def run_once(self, kojitag, timestamp, **kwargs):
# kojitag is e.g. dist-f13-updates-pending
# timestamp is e.g. 123456 (unix time), it's the last modification
time of the kojitag;
# it's important to have it passed over by the watcher, because it
may have changed between
# the watcher has run and this test has started
if not timestamp_still_actual(kojitag, timestamp):
# kojitag changed in the meantime, that means another test is
scheduled
test_exit()
(pending, accepted) = get_pending_and_accepted_sets()
result = do_test(pending, accepted)
if not timestamp_still_actual(kojitag, timestamp):
# kojitag changed in the meantime, that means another test is
scheduled
test_exit()
report_result(result)
def timestamp_still_actual(kojitag, timestamp):
current_timestamp = get_current_timestamp(kojitag)
assert current_timestamp >= timestamp # just a sanity check
return current_timestamp == timestamp
}}}
--
Ticket URL: <
https://fedorahosted.org/autoqa/ticket/248#comment:4>
AutoQA <
http://autoqa.fedorahosted.org>
Automated QA project