In addition to cluttering the namespace, unused imports generate
compiler warnings, introducing noise and obscuring more important
compiler warnings. This change removes them.
Seems to have caused spurious timeout errors.
https://jenkins.ci.cloudbees.com/job/core/job/jenkins_main_trunk/1748/testReport/junit/hudson.scheduler/CronTabEventualityTest/testFirstSundayOfMonthWillBeEventuallyTriggeredWithinOneMonthAndOneWeek_0_/
java.lang.Exception: test timed out after 1000 milliseconds
at java.io.UnixFileSystem.getBooleanAttributes0(Native Method)
at java.io.UnixFileSystem.getBooleanAttributes(UnixFileSystem.java:242)
at java.io.File.exists(File.java:772)
at sun.misc.URLClassPath$FileLoader.getResource(URLClassPath.java:1072)
at sun.misc.URLClassPath.getResource(URLClassPath.java:199)
at java.net.URLClassLoader$1.run(URLClassLoader.java:358)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at hudson.scheduler.CronTab.set(CronTab.java:87)
at hudson.scheduler.CronTab.<init>(CronTab.java:83)
at hudson.scheduler.CronTab.<init>(CronTab.java:66)
at hudson.scheduler.CronTabEventualityTest.checkEventuality(CronTabEventualityTest.java:113)
at hudson.scheduler.CronTabEventualityTest.testFirstSundayOfMonthWillBeEventuallyTriggeredWithinOneMonthAndOneWeek(CronTabEventualityTest.java:109)
Note that the above description is incorrect as to what the merge was about.
It is the message that I intended to make. It appears that I accidentaly merged multiple fixes waiting to be reviewed on my private fork.
This reverts commit dce0d2aff0, reversing
changes made to 63f67f30bd.
HUDSON-8401.
This grouping of tests targets all Sunday to *another day of week* cron
tabs. There are likely other pairs that could be tested, but this seemed to
work out most of the bugs.
Having a calendar with the first day of week being Monday (such as in the en_GB locale), setting DoW to Sunday moves the calendar forward whereas in cron it expects the calendar to go backward in time.
Adjusting this logic.