You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by pa...@apache.org on 2015/10/24 03:39:06 UTC
incubator-groovy git commit: make DateTest less fragile on CI servers
Repository: incubator-groovy
Updated Branches:
refs/heads/master f24741dc9 -> 295842f09
make DateTest less fragile on CI servers
Project: http://git-wip-us.apache.org/repos/asf/incubator-groovy/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-groovy/commit/295842f0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-groovy/tree/295842f0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-groovy/diff/295842f0
Branch: refs/heads/master
Commit: 295842f0985e5822a7cafba97d959d922b4c4f4d
Parents: f24741d
Author: paulk <pa...@asert.com.au>
Authored: Sat Oct 24 11:38:47 2015 +1000
Committer: paulk <pa...@asert.com.au>
Committed: Sat Oct 24 11:38:47 2015 +1000
----------------------------------------------------------------------
src/test/groovy/DateTest.groovy | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-groovy/blob/295842f0/src/test/groovy/DateTest.groovy
----------------------------------------------------------------------
diff --git a/src/test/groovy/DateTest.groovy b/src/test/groovy/DateTest.groovy
index f20279c..3c2034d 100644
--- a/src/test/groovy/DateTest.groovy
+++ b/src/test/groovy/DateTest.groovy
@@ -42,12 +42,14 @@ class DateTest extends GroovyTestCase {
}
void testDateNextPrevious() {
+ def tz = TimeZone.default
def x = new Date()
def y = x + 2
assert x < y
+ def crossedDaylightSavingBoundary = tz.inDaylightTime(x) ^ tz.inDaylightTime(y)
++x
--y
- assert x == y
+ if (!crossedDaylightSavingBoundary) assert x == y
x += 2
assert x > y
}