[tor-bugs] #19771 [Metrics/CollecTor]: investigate halt of scheduling for one of many tasks in collector's scheduler
Tor Bug Tracker & Wiki
blackhole at torproject.org
Tue Aug 9 10:20:04 UTC 2016
#19771: investigate halt of scheduling for one of many tasks in collector's
scheduler
-------------------------------+---------------------------------
Reporter: iwakeh | Owner: iwakeh
Type: defect | Status: needs_review
Priority: High | Milestone: CollecTor 1.0.0
Component: Metrics/CollecTor | Version:
Severity: Normal | Resolution:
Keywords: | Actual Points:
Parent ID: | Points:
Reviewer: | Sponsor:
-------------------------------+---------------------------------
Comment (by iwakeh):
Well, the tweaking didn't go far enough :-)
As the scheduling behavior got changed the test now needs to wait a little
longer.
Here is the diff:
{{{
diff --git
a/src/test/java/org/torproject/collector/cron/SchedulerTest.java
b/src/test/java/org/torproject/collector/cron/SchedulerTest.java
index 3fad830..85f7002 100644
--- a/src/test/java/org/torproject/collector/cron/SchedulerTest.java
+++ b/src/test/java/org/torproject/collector/cron/SchedulerTest.java
@@ -107,7 +107,7 @@ public class SchedulerTest {
schedulerField.get(Scheduler.getInstance());
Scheduler.getInstance().scheduleModuleRuns(ctms, conf);
long sysNow = System.currentTimeMillis();
- while (System.currentTimeMillis() - sysNow < 120_000) {
+ while (System.currentTimeMillis() - sysNow < 180_000) {
try { Thread.sleep(10_000);} catch (Exception e) { /* ignored */ }
}
assertEquals(15, Broken.count.intValue());
}}}
With the old version the first runs happened immediately, now the
scheduler waits for the beginning of the next minute. So, increasing test
time makes it pass again.
(You probably noticed, but just in case: the logs in `generated/test-logs`
help pass the time waiting for the test to complete :-)
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/19771#comment:10>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list