Repository: incubator-rya Updated Branches: refs/heads/develop c53b5402b -> 3702adfb5
Fixed failing test. RYA-6 Project: http://git-wip-us.apache.org/repos/asf/incubator-rya/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-rya/commit/3702adfb Tree: http://git-wip-us.apache.org/repos/asf/incubator-rya/tree/3702adfb Diff: http://git-wip-us.apache.org/repos/asf/incubator-rya/diff/3702adfb Branch: refs/heads/develop Commit: 3702adfb56bb7ff3caf3553d3fe3cb224447e1e4 Parents: c53b540 Author: David W. Lotts <[email protected]> Authored: Tue Apr 12 12:08:38 2016 -0400 Committer: pujav65 <[email protected]> Committed: Fri May 13 09:16:55 2016 -0400 ---------------------------------------------------------------------- .../java/mvm/rya/accumulo/AccumuloRyaDAOTest.java | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/3702adfb/dao/accumulo.rya/src/test/java/mvm/rya/accumulo/AccumuloRyaDAOTest.java ---------------------------------------------------------------------- diff --git a/dao/accumulo.rya/src/test/java/mvm/rya/accumulo/AccumuloRyaDAOTest.java b/dao/accumulo.rya/src/test/java/mvm/rya/accumulo/AccumuloRyaDAOTest.java index 5c30e67..8b55070 100644 --- a/dao/accumulo.rya/src/test/java/mvm/rya/accumulo/AccumuloRyaDAOTest.java +++ b/dao/accumulo.rya/src/test/java/mvm/rya/accumulo/AccumuloRyaDAOTest.java @@ -412,16 +412,18 @@ public class AccumuloRyaDAOTest { public void testQueryDates() throws Exception { RyaURI cpu = new RyaURI(litdupsNS + "cpu"); RyaURI loadPerc = new RyaURI(litdupsNS + "loadPerc"); - RyaType uri1 = new RyaType(XMLSchema.DATETIME, "2000-01-01"); - RyaType uri2 = new RyaType(XMLSchema.DATETIME, "2000-01-01TZ"); + RyaType uri0 = new RyaType(XMLSchema.DATETIME, "1960-01-01"); // How handles local time + RyaType uri1 = new RyaType(XMLSchema.DATETIME, "1992-01-01T+10:00"); // See Magadan Time + RyaType uri2 = new RyaType(XMLSchema.DATETIME, "2000-01-01TZ"); // How it handles UTC. RyaType uri3 = new RyaType(XMLSchema.DATETIME, "2000-01-01T00:00:01.111Z"); - RyaType uri4 = new RyaType(XMLSchema.DATETIME, "2000-01-01T00:00:01"); - RyaType uri5 = new RyaType(XMLSchema.DATETIME, "2000-01-01T00:00:01.111"); - RyaType uri6 = new RyaType(XMLSchema.DATETIME, "2000-01-01T00:00:01Z"); + RyaType uri4 = new RyaType(XMLSchema.DATETIME, "2000-01-01T00:00:01.111Z"); // duplicate + RyaType uri5 = new RyaType(XMLSchema.DATETIME, "2000-01-01T00:00:01-00:00"); + RyaType uri6 = new RyaType(XMLSchema.DATETIME, "2000-01-01T00:00:01Z"); // duplicate RyaType uri7 = new RyaType(XMLSchema.DATETIME, "-2000-01-01T00:00:01Z"); RyaType uri8 = new RyaType(XMLSchema.DATETIME, "111-01-01T00:00:01Z"); RyaType uri9 = new RyaType(XMLSchema.DATETIME, "12345-01-01T00:00:01Z"); + dao.add(new RyaStatement(cpu, loadPerc, uri0)); dao.add(new RyaStatement(cpu, loadPerc, uri1)); dao.add(new RyaStatement(cpu, loadPerc, uri2)); dao.add(new RyaStatement(cpu, loadPerc, uri3)); @@ -435,6 +437,7 @@ public class AccumuloRyaDAOTest { AccumuloRyaQueryEngine queryEngine = dao.getQueryEngine(); Collection<RyaStatement> coll = new ArrayList(); + coll.add(new RyaStatement(null, loadPerc, uri0)); coll.add(new RyaStatement(null, loadPerc, uri1)); coll.add(new RyaStatement(null, loadPerc, uri2)); CloseableIteration<RyaStatement, RyaDAOException> iter = queryEngine.batchQuery(coll, conf); @@ -444,13 +447,14 @@ public class AccumuloRyaDAOTest { iter.next(); } iter.close(); - assertEquals(2, count); + assertEquals("Three time zones should be normalized when stored, then normalized same when queried.",3, count); //now use batchscanner AccumuloRdfConfiguration queryConf = new AccumuloRdfConfiguration(conf); queryConf.setMaxRangesForScanner(2); coll = new ArrayList(); + coll.add(new RyaStatement(null, loadPerc, uri0)); coll.add(new RyaStatement(null, loadPerc, uri1)); coll.add(new RyaStatement(null, loadPerc, uri2)); coll.add(new RyaStatement(null, loadPerc, uri3)); @@ -467,7 +471,7 @@ public class AccumuloRyaDAOTest { iter.next(); } iter.close(); - assertEquals(9, count); + assertEquals("Variety of time specs, including BC, pre-1970, duplicate pair ovewrite,future, 3 digit year.",8, count); } @Test
