You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rya.apache.org by dl...@apache.org on 2018/03/20 17:32:00 UTC
[1/2] incubator-rya git commit: RYA-476 Fixes tests sensitive to DST
spring forward. Closes #283 [Forced Update!]
Repository: incubator-rya
Updated Branches:
refs/heads/master c82021393 -> 544ffddf4 (forced update)
RYA-476 Fixes tests sensitive to DST spring forward. Closes #283
Project: http://git-wip-us.apache.org/repos/asf/incubator-rya/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-rya/commit/1675f71a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-rya/tree/1675f71a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-rya/diff/1675f71a
Branch: refs/heads/master
Commit: 1675f71a7410874ea0c7ce5924c9632f592c8fd5
Parents: 770bd7e
Author: David W. Lotts <da...@parsons.com>
Authored: Wed Mar 14 11:48:14 2018 -0400
Committer: David W. Lotts <da...@parsons.com>
Committed: Tue Mar 20 13:30:17 2018 -0400
----------------------------------------------------------------------
.../rya/api/functions/DateTimeWithinPeriodTest.java | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/1675f71a/common/rya.api/src/test/java/org/apache/rya/api/functions/DateTimeWithinPeriodTest.java
----------------------------------------------------------------------
diff --git a/common/rya.api/src/test/java/org/apache/rya/api/functions/DateTimeWithinPeriodTest.java b/common/rya.api/src/test/java/org/apache/rya/api/functions/DateTimeWithinPeriodTest.java
index 0fb0f2a..ac27d1b 100644
--- a/common/rya.api/src/test/java/org/apache/rya/api/functions/DateTimeWithinPeriodTest.java
+++ b/common/rya.api/src/test/java/org/apache/rya/api/functions/DateTimeWithinPeriodTest.java
@@ -38,12 +38,13 @@ public class DateTimeWithinPeriodTest {
private static final ValueFactory vf = new ValueFactoryImpl();
private static final Literal TRUE = vf.createLiteral(true);
private static final Literal FALSE = vf.createLiteral(false);
+ private static final ZonedDateTime testThisTimeDate = ZonedDateTime.parse("2018-02-03T14:15:16+07:00");
@Test
public void testSeconds() throws DatatypeConfigurationException, ValueExprEvaluationException {
DatatypeFactory dtf = DatatypeFactory.newInstance();
- ZonedDateTime zTime = ZonedDateTime.now();
+ ZonedDateTime zTime = testThisTimeDate;
String time = zTime.format(DateTimeFormatter.ISO_INSTANT);
ZonedDateTime zTime1 = zTime.minusSeconds(1);
@@ -64,7 +65,7 @@ public class DateTimeWithinPeriodTest {
DatatypeFactory dtf = DatatypeFactory.newInstance();
- ZonedDateTime zTime = ZonedDateTime.now();
+ ZonedDateTime zTime = testThisTimeDate;
String time = zTime.format(DateTimeFormatter.ISO_INSTANT);
ZonedDateTime zTime1 = zTime.minusMinutes(1);
@@ -85,7 +86,7 @@ public class DateTimeWithinPeriodTest {
public void testHours() throws DatatypeConfigurationException, ValueExprEvaluationException {
DatatypeFactory dtf = DatatypeFactory.newInstance();
- ZonedDateTime zTime = ZonedDateTime.now();
+ ZonedDateTime zTime = testThisTimeDate;
String time = zTime.format(DateTimeFormatter.ISO_INSTANT);
ZonedDateTime zTime1 = zTime.minusHours(1);
@@ -106,7 +107,7 @@ public class DateTimeWithinPeriodTest {
public void testDays() throws DatatypeConfigurationException, ValueExprEvaluationException {
DatatypeFactory dtf = DatatypeFactory.newInstance();
- ZonedDateTime zTime = ZonedDateTime.now();
+ ZonedDateTime zTime = testThisTimeDate;
String time = zTime.format(DateTimeFormatter.ISO_INSTANT);
ZonedDateTime zTime1 = zTime.minusDays(1);
@@ -122,11 +123,12 @@ public class DateTimeWithinPeriodTest {
assertEquals(TRUE, func.evaluate(vf, now, nowMinusOne, vf.createLiteral(2), OWLTime.DAYS_URI));
}
+ // Note that this test fails if the week under test spans a DST when the USA springs forward.
@Test
public void testWeeks() throws DatatypeConfigurationException, ValueExprEvaluationException {
DatatypeFactory dtf = DatatypeFactory.newInstance();
- ZonedDateTime zTime = ZonedDateTime.now();
+ ZonedDateTime zTime = testThisTimeDate;
String time = zTime.format(DateTimeFormatter.ISO_INSTANT);
ZonedDateTime zTime1 = zTime.minusWeeks(1);
@@ -151,7 +153,7 @@ public class DateTimeWithinPeriodTest {
public void testTimeZone() throws DatatypeConfigurationException, ValueExprEvaluationException {
DatatypeFactory dtf = DatatypeFactory.newInstance();
- ZonedDateTime now = ZonedDateTime.now();
+ ZonedDateTime now = testThisTimeDate;
String time = now.format(DateTimeFormatter.ISO_INSTANT);
ZonedDateTime zTime1 = now.withZoneSameInstant(ZoneId.of("Europe/London"));
@@ -176,5 +178,4 @@ public class DateTimeWithinPeriodTest {
assertEquals(TRUE, func.evaluate(vf, nowLocal, nowAsiaTZMinusOne, vf.createLiteral(2), OWLTime.DAYS_URI));
}
-
}
[2/2] incubator-rya git commit: POM version fix. Closes #281
Posted by dl...@apache.org.
POM version fix. Closes #281
Project: http://git-wip-us.apache.org/repos/asf/incubator-rya/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-rya/commit/544ffddf
Tree: http://git-wip-us.apache.org/repos/asf/incubator-rya/tree/544ffddf
Diff: http://git-wip-us.apache.org/repos/asf/incubator-rya/diff/544ffddf
Branch: refs/heads/master
Commit: 544ffddf43e1ba1df13fd364fe0bb102caff3025
Parents: 1675f71
Author: jdasch <hc...@gmail.com>
Authored: Mon Mar 12 09:59:33 2018 -0400
Committer: David W. Lotts <da...@parsons.com>
Committed: Tue Mar 20 13:30:23 2018 -0400
----------------------------------------------------------------------
extras/rya.streams/query-manager/pom.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/544ffddf/extras/rya.streams/query-manager/pom.xml
----------------------------------------------------------------------
diff --git a/extras/rya.streams/query-manager/pom.xml b/extras/rya.streams/query-manager/pom.xml
index afb0386..fc1a358 100644
--- a/extras/rya.streams/query-manager/pom.xml
+++ b/extras/rya.streams/query-manager/pom.xml
@@ -22,7 +22,7 @@ under the License.
<parent>
<groupId>org.apache.rya</groupId>
<artifactId>rya.streams.parent</artifactId>
- <version>3.2.12-incubating-SNAPSHOT</version>
+ <version>3.2.13-incubating-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -290,4 +290,4 @@ under the License.
</plugin>
</plugins>
</build>
-</project>
\ No newline at end of file
+</project>