afs commented on code in PR #1689:
URL: https://github.com/apache/jena/pull/1689#discussion_r1052595464


##########
jena-extras/jena-serviceenhancer/src/test/java/org/apache/jena/sparql/service/enhancer/impl/TestServiceEnhancerMisc.java:
##########
@@ -462,4 +471,55 @@ public void testNormalization01() {
         int actualRowCount = 
AbstractTestServiceEnhancerResultSetLimits.testWithCleanCaches(dataset, 
queryStr, 1000);
         Assert.assertEquals(4, actualRowCount);
     }
+
+    /**
+     * Test for <a 
href="https://github.com/apache/jena/issues/1688";>JENA-1688</a>.
+     * <p>
+     * This test checks that building an overall result set from a bulk request
+     * that involves contributions of cached empty result sets works as 
expected.
+     * Without the fix corresponding to this issues this test fails.
+     *
+     * @implNote This test case makes use of a dataset where only a few 
resources have labels.
+     * The test query caches the labels of all resources which means that most 
cache entries
+     * have empty results.
+     */
+    @Test
+    public void testEmptyResultSetContribution() {
+        String dataStr = 
String.join(StandardSystemProperty.LINE_SEPARATOR.value(),

Review Comment:
   Not critical but why not "\n"? SPARQL is a web language.
   



##########
jena-extras/jena-serviceenhancer/src/test/java/org/apache/jena/sparql/service/enhancer/impl/TestServiceEnhancerMisc.java:
##########
@@ -462,4 +471,55 @@ public void testNormalization01() {
         int actualRowCount = 
AbstractTestServiceEnhancerResultSetLimits.testWithCleanCaches(dataset, 
queryStr, 1000);
         Assert.assertEquals(4, actualRowCount);
     }
+
+    /**
+     * Test for <a 
href="https://github.com/apache/jena/issues/1688";>JENA-1688</a>.

Review Comment:
   JENA-1688 is a JIRA from 2019!
   Try: "apache/jena/issues/1688"



##########
jena-extras/jena-serviceenhancer/src/test/java/org/apache/jena/sparql/service/enhancer/impl/TestServiceEnhancerMisc.java:
##########
@@ -462,4 +471,55 @@ public void testNormalization01() {
         int actualRowCount = 
AbstractTestServiceEnhancerResultSetLimits.testWithCleanCaches(dataset, 
queryStr, 1000);
         Assert.assertEquals(4, actualRowCount);
     }
+
+    /**
+     * Test for <a 
href="https://github.com/apache/jena/issues/1688";>JENA-1688</a>.
+     * <p>
+     * This test checks that building an overall result set from a bulk request
+     * that involves contributions of cached empty result sets works as 
expected.
+     * Without the fix corresponding to this issues this test fails.
+     *
+     * @implNote This test case makes use of a dataset where only a few 
resources have labels.
+     * The test query caches the labels of all resources which means that most 
cache entries
+     * have empty results.
+     */
+    @Test
+    public void testEmptyResultSetContribution() {
+        String dataStr = 
String.join(StandardSystemProperty.LINE_SEPARATOR.value(),
+            "PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>",
+            "<urn:example:00> a rdfs:Resource .",
+            "<urn:example:01> a rdfs:Resource .",
+            "<urn:example:02> a rdfs:Resource .",
+            "<urn:example:03> a rdfs:Resource .",
+            "<urn:example:04> a rdfs:Resource ; rdfs:label \"04\" .",
+            "<urn:example:05> a rdfs:Resource .",
+            "<urn:example:06> a rdfs:Resource .",
+            "<urn:example:07> a rdfs:Resource .",
+            "<urn:example:08> a rdfs:Resource ; rdfs:label \"08\" .",

Review Comment:
   FYI: use single quotes to neaten up -`'08'`.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to