Commit Graph
37 Commits
Author SHA1 Message Date
Christopher Simons 7efb9090dd remove unused import statements
In addition to cluttering the namespace, unused imports generate
compiler warnings, introducing noise and obscuring more important
compiler warnings.  This change removes them.
2015-11-10 10:13:52 -05:00
Boris 6b4d044ae0 JENKINS-9283 - Allow timezone definition in scheduler 2015-05-19 07:53:47 +03:00
René Scheibe bd1d6251e0 replace all deprecated @Bug annotations with @Issue 2015-01-07 17:12:21 +01:00
Daniel Beck b090751c16 [JENKINS-25897] Add tests 2014-12-23 11:22:01 +01:00
Jesse Glick 5727f287e2 Warn in the UI about short cycles in the day of month field for a crontab, which can have surprising behaviors near the end of a month. 2014-01-16 11:27:27 -05:00
Jesse Glick 66805b7463 Why did these tests have timeouts?
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)
2013-12-16 16:25:05 -05:00
Jesse Glick d2603bedd5 Verifying that repeating hash syntax does something useful.
http://stackoverflow.com/questions/11896675/can-i-make-the-scm-polling-interval-for-jenkins-randomised/11898132#11898132
2013-04-03 11:51:21 -04:00
Jesse Glick 7f92a9bd1a [JENKINS-17311] Improved hashify to detect manual skip idiom. 2013-03-25 13:34:49 -04:00
Kohsuke Kawaguchi 17e7d7a1e6 minor touch-up and documentation
as I was playing with it to understand what those logics mean.
2013-03-25 09:51:24 -07:00
Jesse Glick a941338b8a Promote use of crontab hashes in documentation and form validation. 2013-03-22 18:23:54 -04:00
Jesse Glick ccf8427ae7 Merge branch 'master' into cron-hash-JENKINS-17311 2013-03-22 15:42:56 -04:00
Jesse Glick f6a2f64bd6 Test & I18N for checkSanity. 2013-03-22 15:42:23 -04:00
Jesse Glick 3e71c97639 hudson.scheduler.BaseParser.hash=true by default: @daily should not necessarily mean 12:00 AM. 2013-03-22 15:26:59 -04:00
Jesse Glick 67c0edd014 Support skips with hash syntax. 2013-03-22 15:17:01 -04:00
Jesse Glick a689c472ab More pleasant way to test bitsets. 2013-03-21 18:05:51 -04:00
Jesse Glick 7f10717451 More tests of hash syntax. 2013-03-21 16:56:18 -04:00
Jesse Glick f9638163a9 fromdos 2013-03-21 16:39:32 -04:00
Jesse Glick e94152df33 Avoiding printing anything unless there is actually a failure.
Also take advantage of JUnit’s ability to show the exact spot of a mismatch between two strings.
2013-03-21 16:30:29 -04:00
Jesse Glick c454eaacf4 ohtake’s 20249e4 accidentally suppressed all but one test case. 2013-03-21 15:32:09 -04:00
OHTAKE Tomohiro 20249e4adc [FIXED JENKINS-12357] Crontab#ceil may stuck in an infinite loop or may return an incorrect value if day of week is 7 (=0, Sunday)
To use @Test(timeout), inheritance from TestCase should be removed
2012-01-30 09:02:23 +09:00
OHTAKE Tomohiro c24238ebbe Fix method name 2012-01-30 09:02:22 +09:00
OHTAKE Tomohiro 240c381bb8 [FIXED JENKINS-12388] Add tests for JENKINS-12388 2012-01-30 09:02:20 +09:00
Kohsuke Kawaguchi b1bb3f6667 Added code to evenly distribute tokens like @daily to arbitrary time of the day.
This prevents the load spike at midnight and other known time/date.
2012-01-04 22:11:47 -08:00
Jerome Lacoste 7e3bc36b39 Revert "merge changelog.html fixes from kk"
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.
2011-02-07 14:50:17 +01:00
Jerome Lacoste 826d9ddb3d JENKINS-8702 improve unit tests. Some core tests are cluttering the output with unuseful logs 2011-02-05 12:24:05 +01:00
Brian Atkinson f134bd68b9 Add two exact tests for HUDSON-8656. 2011-02-04 18:45:12 -06:00
Brian Atkinson e7eac75978 This adds a test from HUDSON-8656, and is likely related to issues found in
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.
2011-02-04 18:45:12 -06:00
Kohsuke Kawaguchi b390d9f091 spinning the test annotations off to a library so that it can be used in other places, like in the core 2011-01-24 13:40:59 -08:00
Kohsuke Kawaguchi 8411557322 [FIXED HUDSON-8401] calendar handling fix with Mon-Sun week (as opposed to Sun-Sat week)
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.
2011-01-21 10:29:49 -08:00
jtnord 6e011bc7d3 Update .gitignore to ignore eclipse files.
Correct (incorrect) comment in CronTabTest
2010-12-02 22:24:49 +00:00
mindless 802f038bc2 merge CrontabTest into CronTabTest, as both can't be checked out
on case-insensitive filesystem


git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@34648 71c3de6d-444a-0410-be80-ed276b4c234a
2010-09-10 14:51:47 +00:00
kohsuke 489f8d9b77 implement the floor method.
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@34634 71c3de6d-444a-0410-be80-ed276b4c234a
2010-09-09 22:37:01 +00:00
kohsuke 350bf69165 added a method to compute the nearest matching time, given a time.
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@34633 71c3de6d-444a-0410-be80-ed276b4c234a
2010-09-09 22:36:44 +00:00
kohsuke 1a1d0d74d5 license header clean up
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@15081 71c3de6d-444a-0410-be80-ed276b4c234a
2009-02-06 20:05:24 +00:00
kohsuke 99befc575a typo
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@7656 71c3de6d-444a-0410-be80-ed276b4c234a
2008-03-13 01:52:25 +00:00
kohsuke d2ea839213 Crontab grammar wasn't recognizing @xxxx (#1342)
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@7655 71c3de6d-444a-0410-be80-ed276b4c234a
2008-03-13 01:30:25 +00:00
kohsuke 8a0dc230f4 initial commit for a new layout.
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@969 71c3de6d-444a-0410-be80-ed276b4c234a
2006-11-05 21:16:01 +00:00