[GitHub] incubator-rya pull request #293: RYA-491 Repackaged reusable Mongo DB test c...

2018-05-01 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/incubator-rya/pull/293


---


[GitHub] incubator-rya pull request #293: RYA-491 Repackaged reusable Mongo DB test c...

2018-04-25 Thread kchilton2
Github user kchilton2 commented on a diff in the pull request:

https://github.com/apache/incubator-rya/pull/293#discussion_r184151510
  
--- Diff: 
dao/mongodb.rya/src/test/java/org/apache/rya/mongodb/MongoDBRyaDAO2IT.java ---
@@ -40,11 +40,11 @@
 /**
  * Integration tests the methods of {@link MongoDBRyaDAO}.
  */
-public class MongoDBRyaDAO2IT extends MongoITBase {
+public class MongoDBRyaDAO2IT extends MongoRyaITBase {
--- End diff --

I'm not messing with classes that already exist except to deal with my 
repackaging.


---


[GitHub] incubator-rya pull request #293: RYA-491 Repackaged reusable Mongo DB test c...

2018-04-25 Thread kchilton2
Github user kchilton2 commented on a diff in the pull request:

https://github.com/apache/incubator-rya/pull/293#discussion_r184151567
  
--- Diff: 
dao/mongodb.rya/src/test/java/org/apache/rya/mongodb/aggregation/PipelineQueryIT.java
 ---
@@ -423,28 +423,28 @@ public void testRequiredTimestamp() throws Exception {
 + "  ?A rdfs:subClassOf ?B .\n"
 + "  ?B rdfs:subClassOf ?A .\n"
 + "}";
-List varNames = Arrays.asList("A", "B");
-Multiset expectedSolutions = HashMultiset.create();
+final List varNames = Arrays.asList("A", "B");
+final Multiset expectedSolutions = 
HashMultiset.create();
 expectedSolutions.add(new ListBindingSet(varNames, person, 
FOAF.PERSON));
 expectedSolutions.add(new ListBindingSet(varNames, FOAF.PERSON, 
person));
 expectedSolutions.add(new ListBindingSet(varNames, thing, 
OWL.THING));
 expectedSolutions.add(new ListBindingSet(varNames, OWL.THING, 
thing));
 // Prepare query and convert to pipeline
-QueryRoot queryTree = new QueryRoot(PARSER.parseQuery(query, 
null).getTupleExpr());
-SparqlToPipelineTransformVisitor visitor = new 
SparqlToPipelineTransformVisitor(getRyaCollection());
+final QueryRoot queryTree = new QueryRoot(PARSER.parseQuery(query, 
null).getTupleExpr());
+final SparqlToPipelineTransformVisitor visitor = new 
SparqlToPipelineTransformVisitor(getRyaCollection());
 queryTree.visit(visitor);
 Assert.assertTrue(queryTree.getArg() instanceof 
AggregationPipelineQueryNode);
-AggregationPipelineQueryNode pipelineNode = 
(AggregationPipelineQueryNode) queryTree.getArg();
+final AggregationPipelineQueryNode pipelineNode = 
(AggregationPipelineQueryNode) queryTree.getArg();
 // Extend the pipeline by requiring a timestamp of zero (should 
have no effect)
 pipelineNode.requireSourceTimestamp(0);
-Multiset solutions = HashMultiset.create();
+final Multiset solutions = HashMultiset.create();
 CloseableIteration iter = 
pipelineNode.evaluate(new QueryBindingSet());
 while (iter.hasNext()) {
 solutions.add(iter.next());
 }
 Assert.assertEquals(expectedSolutions, solutions);
 // Extend the pipeline by requiring a future timestamp (should 
produce no results)
-long delta = 1000 * 60 * 60 * 24;
+final long delta = 1000 * 60 * 60 * 24;
--- End diff --

I'm not messing with classes that already exist except to deal with my 
repackaging.


---


[GitHub] incubator-rya pull request #293: RYA-491 Repackaged reusable Mongo DB test c...

2018-04-25 Thread kchilton2
Github user kchilton2 commented on a diff in the pull request:

https://github.com/apache/incubator-rya/pull/293#discussion_r184151234
  
--- Diff: pom.xml ---
@@ -381,6 +458,26 @@ under the License.
 rya.indexing.pcj
 ${project.version}
 
+
+org.apache.rya
+rya.kafka.connect.parent
--- End diff --

Yep, not sure how that got in there.


---


[GitHub] incubator-rya pull request #293: RYA-491 Repackaged reusable Mongo DB test c...

2018-04-25 Thread ejwhite922
Github user ejwhite922 commented on a diff in the pull request:

https://github.com/apache/incubator-rya/pull/293#discussion_r184127031
  
--- Diff: 
dao/mongodb.rya/src/test/java/org/apache/rya/mongodb/aggregation/PipelineQueryIT.java
 ---
@@ -423,28 +423,28 @@ public void testRequiredTimestamp() throws Exception {
 + "  ?A rdfs:subClassOf ?B .\n"
 + "  ?B rdfs:subClassOf ?A .\n"
 + "}";
-List varNames = Arrays.asList("A", "B");
-Multiset expectedSolutions = HashMultiset.create();
+final List varNames = Arrays.asList("A", "B");
+final Multiset expectedSolutions = 
HashMultiset.create();
 expectedSolutions.add(new ListBindingSet(varNames, person, 
FOAF.PERSON));
 expectedSolutions.add(new ListBindingSet(varNames, FOAF.PERSON, 
person));
 expectedSolutions.add(new ListBindingSet(varNames, thing, 
OWL.THING));
 expectedSolutions.add(new ListBindingSet(varNames, OWL.THING, 
thing));
 // Prepare query and convert to pipeline
-QueryRoot queryTree = new QueryRoot(PARSER.parseQuery(query, 
null).getTupleExpr());
-SparqlToPipelineTransformVisitor visitor = new 
SparqlToPipelineTransformVisitor(getRyaCollection());
+final QueryRoot queryTree = new QueryRoot(PARSER.parseQuery(query, 
null).getTupleExpr());
+final SparqlToPipelineTransformVisitor visitor = new 
SparqlToPipelineTransformVisitor(getRyaCollection());
 queryTree.visit(visitor);
 Assert.assertTrue(queryTree.getArg() instanceof 
AggregationPipelineQueryNode);
-AggregationPipelineQueryNode pipelineNode = 
(AggregationPipelineQueryNode) queryTree.getArg();
+final AggregationPipelineQueryNode pipelineNode = 
(AggregationPipelineQueryNode) queryTree.getArg();
 // Extend the pipeline by requiring a timestamp of zero (should 
have no effect)
 pipelineNode.requireSourceTimestamp(0);
-Multiset solutions = HashMultiset.create();
+final Multiset solutions = HashMultiset.create();
 CloseableIteration iter = 
pipelineNode.evaluate(new QueryBindingSet());
 while (iter.hasNext()) {
 solutions.add(iter.next());
 }
 Assert.assertEquals(expectedSolutions, solutions);
 // Extend the pipeline by requiring a future timestamp (should 
produce no results)
-long delta = 1000 * 60 * 60 * 24;
+final long delta = 1000 * 60 * 60 * 24;
--- End diff --

Maybe change to TimeUnit.DAYS.toMillis(1);


---


[GitHub] incubator-rya pull request #293: RYA-491 Repackaged reusable Mongo DB test c...

2018-04-25 Thread ejwhite922
Github user ejwhite922 commented on a diff in the pull request:

https://github.com/apache/incubator-rya/pull/293#discussion_r184128364
  
--- Diff: 
dao/mongodb.rya/src/test/java/org/apache/rya/mongodb/MongoDBRyaDAO2IT.java ---
@@ -40,11 +40,11 @@
 /**
  * Integration tests the methods of {@link MongoDBRyaDAO}.
  */
-public class MongoDBRyaDAO2IT extends MongoITBase {
+public class MongoDBRyaDAO2IT extends MongoRyaITBase {
--- End diff --

Is this class needed?  Looks like MongoDBRyaDAOIT has the same tests and a 
few more and includes visibility.


---


[GitHub] incubator-rya pull request #293: RYA-491 Repackaged reusable Mongo DB test c...

2018-04-25 Thread ejwhite922
Github user ejwhite922 commented on a diff in the pull request:

https://github.com/apache/incubator-rya/pull/293#discussion_r184149352
  
--- Diff: pom.xml ---
@@ -381,6 +458,26 @@ under the License.
 rya.indexing.pcj
 ${project.version}
 
+
+org.apache.rya
+rya.kafka.connect.parent
--- End diff --

Don't think these belong in this PR.


---


[GitHub] incubator-rya pull request #293: RYA-491 Repackaged reusable Mongo DB test c...

2018-04-24 Thread kchilton2
GitHub user kchilton2 opened a pull request:

https://github.com/apache/incubator-rya/pull/293

RYA-491 Repackaged reusable Mongo DB test code into a project named '…

…rya.test.mongo'.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/kchilton2/incubator-rya RYA-491

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-rya/pull/293.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #293


commit 6752b3749eb851f9da74f75a516d49e1b24fc2c5
Author: kchilton2 
Date:   2018-04-19T19:18:38Z

RYA-489 Moved common Accumulo integration test code to the 
rya.test.accumulo project.

commit 5d973efe08a5f9d3b6e2f0a8ac8475baf12f71d8
Author: kchilton2 
Date:   2018-04-24T20:32:05Z

RYA-491 Repackaged reusable Mongo DB test code into a project named 
'rya.test.mongo'.




---