You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zeppelin.apache.org by al...@apache.org on 2020/06/07 16:32:12 UTC

[zeppelin] branch branch-0.9 updated: [ZEPPELIN-4860] Non-determenistic results in SparqlJenaEngineTest

This is an automated email from the ASF dual-hosted git repository.

alexott pushed a commit to branch branch-0.9
in repository https://gitbox.apache.org/repos/asf/zeppelin.git


The following commit(s) were added to refs/heads/branch-0.9 by this push:
     new e32a1e4  [ZEPPELIN-4860] Non-determenistic results in SparqlJenaEngineTest
e32a1e4 is described below

commit e32a1e45d40289763f947480738dfab11d3f99c2
Author: Alex Ott <al...@gmail.com>
AuthorDate: Sun Jun 7 12:29:30 2020 +0200

    [ZEPPELIN-4860] Non-determenistic results in SparqlJenaEngineTest
    
    ### What is this PR for?
    
    Fix a flaky test in SparQL interpreter
    
    ### What type of PR is it?
    
    Bug Fix
    
    ### What is the Jira issue?
    
    * https://issues.apache.org/jira/browse/ZEPPELIN-4860
    
    ### How should this be tested?
    * https://travis-ci.org/github/alexott/zeppelin/builds/695631580
    
    Author: Alex Ott <al...@gmail.com>
    
    Closes #3789 from alexott/ZEPPELIN-4860 and squashes the following commits:
    
    19fb4ecb1 [Alex Ott] [ZEPPELIN-4860] Non-determenistic results in SparqlJenaEngineTest
    
    (cherry picked from commit 50a3c3eca48caea98378504ca18cd073e8a7e0ed)
    Signed-off-by: Alex Ott <al...@apache.org>
---
 .../java/org/apache/zeppelin/sparql/SparqlJenaEngineTest.java     | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/sparql/src/test/java/org/apache/zeppelin/sparql/SparqlJenaEngineTest.java b/sparql/src/test/java/org/apache/zeppelin/sparql/SparqlJenaEngineTest.java
index 15c8880..5a85998 100644
--- a/sparql/src/test/java/org/apache/zeppelin/sparql/SparqlJenaEngineTest.java
+++ b/sparql/src/test/java/org/apache/zeppelin/sparql/SparqlJenaEngineTest.java
@@ -166,11 +166,13 @@ public class SparqlJenaEngineTest {
     SparqlInterpreter interpreter = new SparqlInterpreter(properties);
     interpreter.open();
 
-    final InterpreterResult result = interpreter.interpret(
-        "SELECT DISTINCT ?Concept WHERE {[] a ?Concept} LIMIT 1", null);
+    String query = "PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#>" +
+            "\nSELECT * WHERE {?athlete rdfs:label " +
+            "\"Cristiano Ronaldo\"@en}  order by ?athlete limit 1";
+    final InterpreterResult result = interpreter.interpret(query, null);
     assertEquals(Code.SUCCESS, result.code());
 
-    final String expected = "?Concept\n<http://www.openlinksw.com/schemas/virtrdf#QuadMapFormat>\n";
+    final String expected = "?athlete\n<http://dbpedia.org/resource/Cristiano_Ronaldo>\n";
     assertEquals(expected, result.message().get(0).getData());
   }