Clean up in Fuseki1; warning fixes; comments

Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/926fc524
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/926fc524
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/926fc524

Branch: refs/heads/master
Commit: 926fc524409f97a24cab05df5b1b077a6e4babac
Parents: 3a3628f
Author: Andy Seaborne <a...@apache.org>
Authored: Thu Oct 13 22:08:51 2016 +0100
Committer: ajs6f <aj...@virginia.edu>
Committed: Fri Oct 14 10:08:05 2016 -0400

----------------------------------------------------------------------
 .../java/org/apache/jena/riot/web/HttpOp.java     |  4 ++++
 .../jena/sparql/engine/http/QueryEngineHTTP.java  |  2 +-
 .../sparql/modify/UpdateProcessRemoteForm.java    |  4 ++--
 .../java/org/apache/jena/fuseki/TS_Fuseki.java    | 15 +++++++++------
 .../java/org/apache/jena/fuseki/TestQuery.java    |  7 ++-----
 .../apache/jena/fuseki/TestSPARQLProtocol.java    |  2 --
 .../jena/fuseki/http/TestDatasetAccessorHTTP.java | 18 +++++++++++++-----
 .../fuseki/http/TestDatasetGraphAccessorHTTP.java |  8 ++++----
 8 files changed, 35 insertions(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/926fc524/jena-arq/src/main/java/org/apache/jena/riot/web/HttpOp.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/org/apache/jena/riot/web/HttpOp.java 
b/jena-arq/src/main/java/org/apache/jena/riot/web/HttpOp.java
index 48b1b0b..7830f9a 100644
--- a/jena-arq/src/main/java/org/apache/jena/riot/web/HttpOp.java
+++ b/jena-arq/src/main/java/org/apache/jena/riot/web/HttpOp.java
@@ -224,6 +224,10 @@ public class HttpOp {
             .build() ;
     }
     
+    /**
+     * Create an HttpClient that performs client-side caching and conection 
pooling. This can be used
+     * with {@link #setDefaultHttpClient} or provided in the HttpOp calls.
+     */
     public static CloseableHttpClient createCachingHttpClient() {
         String s = System.getProperty("http.maxConnections", "5");
         int max = Integer.parseInt(s);

http://git-wip-us.apache.org/repos/asf/jena/blob/926fc524/jena-arq/src/main/java/org/apache/jena/sparql/engine/http/QueryEngineHTTP.java
----------------------------------------------------------------------
diff --git 
a/jena-arq/src/main/java/org/apache/jena/sparql/engine/http/QueryEngineHTTP.java
 
b/jena-arq/src/main/java/org/apache/jena/sparql/engine/http/QueryEngineHTTP.java
index 9fb7f51..417e327 100644
--- 
a/jena-arq/src/main/java/org/apache/jena/sparql/engine/http/QueryEngineHTTP.java
+++ 
b/jena-arq/src/main/java/org/apache/jena/sparql/engine/http/QueryEngineHTTP.java
@@ -299,7 +299,7 @@ public class QueryEngineHTTP implements QueryExecution {
     /**
      * Get the HTTP client in use, if none is set then null.
      * 
-     * @param client HTTP client
+     * @return client HTTP client
      */
     public HttpClient getClient() {
         return client;

http://git-wip-us.apache.org/repos/asf/jena/blob/926fc524/jena-arq/src/main/java/org/apache/jena/sparql/modify/UpdateProcessRemoteForm.java
----------------------------------------------------------------------
diff --git 
a/jena-arq/src/main/java/org/apache/jena/sparql/modify/UpdateProcessRemoteForm.java
 
b/jena-arq/src/main/java/org/apache/jena/sparql/modify/UpdateProcessRemoteForm.java
index b827d14..de3a67d 100644
--- 
a/jena-arq/src/main/java/org/apache/jena/sparql/modify/UpdateProcessRemoteForm.java
+++ 
b/jena-arq/src/main/java/org/apache/jena/sparql/modify/UpdateProcessRemoteForm.java
@@ -60,8 +60,8 @@ public class UpdateProcessRemoteForm extends 
UpdateProcessRemoteBase {
      *            Update endpoint
      * @param context
      *            Context
-     * @param authenticator
-     *            HTTP Authenticator
+     * @param client
+     *            HTTP Client
      */
     public UpdateProcessRemoteForm(UpdateRequest request, String endpoint, 
Context context, HttpClient client) {
         this(request, endpoint, context);

http://git-wip-us.apache.org/repos/asf/jena/blob/926fc524/jena-fuseki1/src/test/java/org/apache/jena/fuseki/TS_Fuseki.java
----------------------------------------------------------------------
diff --git a/jena-fuseki1/src/test/java/org/apache/jena/fuseki/TS_Fuseki.java 
b/jena-fuseki1/src/test/java/org/apache/jena/fuseki/TS_Fuseki.java
index 30e8ee3..13f3903 100644
--- a/jena-fuseki1/src/test/java/org/apache/jena/fuseki/TS_Fuseki.java
+++ b/jena-fuseki1/src/test/java/org/apache/jena/fuseki/TS_Fuseki.java
@@ -46,14 +46,17 @@ public class TS_Fuseki extends ServerTest
     // Used for all tests except auth tests.
     static final HttpClient globalPoolingClient = 
HttpOp.createPoolingHttpClient();
     
-    @BeforeClass public static void beforeClassAbstract1() {
+    @BeforeClass
+    static public void beforeClass() {
         HttpOp.setDefaultHttpClient(globalPoolingClient) ;
+        LogCtl.disable(Fuseki.requestLogName) ;
+        // Suppress pooling client retry messages.
+        LogCtl.setLevel("org.apache.http.impl.execchain.RetryExec", "WARN") ;
     }
-    
-    @AfterClass public static void afterClassAbstract1() {
+
+    @AfterClass
+    static public void afterClass() {
         HttpOp.setDefaultHttpClient(defaultHttpClient) ;
+        LogCtl.setInfo(Fuseki.requestLogName) ;
     }
-    
-    @BeforeClass static public void beforeClass() { 
LogCtl.disable(Fuseki.requestLogName) ; }
-    @AfterClass static public void afterClass()   { 
LogCtl.setInfo(Fuseki.requestLogName) ;}
 }

http://git-wip-us.apache.org/repos/asf/jena/blob/926fc524/jena-fuseki1/src/test/java/org/apache/jena/fuseki/TestQuery.java
----------------------------------------------------------------------
diff --git a/jena-fuseki1/src/test/java/org/apache/jena/fuseki/TestQuery.java 
b/jena-fuseki1/src/test/java/org/apache/jena/fuseki/TestQuery.java
index ee00523..7124592 100644
--- a/jena-fuseki1/src/test/java/org/apache/jena/fuseki/TestQuery.java
+++ b/jena-fuseki1/src/test/java/org/apache/jena/fuseki/TestQuery.java
@@ -45,17 +45,14 @@ public class TestQuery extends BaseTest
     }
     
     // DRY - test protocol?
-    @BeforeClass public static void beforeClass()
-    {
+    @BeforeClass public static void beforeClass() {
         ServerTest.allocServer() ;
-        ServerTest.resetServer() ;
         DatasetAccessor du = DatasetAccessorFactory.createHTTP(serviceREST) ;
         du.putModel(model1) ;
         du.putModel(gn1, model2) ;
     }
     
-    @AfterClass public static void afterClass()
-    {
+    @AfterClass public static void afterClass() {
         ServerTest.freeServer() ;
     }
     

http://git-wip-us.apache.org/repos/asf/jena/blob/926fc524/jena-fuseki1/src/test/java/org/apache/jena/fuseki/TestSPARQLProtocol.java
----------------------------------------------------------------------
diff --git 
a/jena-fuseki1/src/test/java/org/apache/jena/fuseki/TestSPARQLProtocol.java 
b/jena-fuseki1/src/test/java/org/apache/jena/fuseki/TestSPARQLProtocol.java
index cffc8c4..b58d8db 100644
--- a/jena-fuseki1/src/test/java/org/apache/jena/fuseki/TestSPARQLProtocol.java
+++ b/jena-fuseki1/src/test/java/org/apache/jena/fuseki/TestSPARQLProtocol.java
@@ -37,7 +37,6 @@ public class TestSPARQLProtocol extends BaseTest
     @BeforeClass public static void beforeClass()
     {
         ServerTest.allocServer() ;
-        ServerTest.resetServer() ;
         // Load some data.
         DatasetAccessor du = DatasetAccessorFactory.createHTTP(serviceREST) ;
         du.putModel(model1) ;
@@ -46,7 +45,6 @@ public class TestSPARQLProtocol extends BaseTest
     
     @AfterClass public static void afterClass()
     {
-        ServerTest.resetServer() ;
         ServerTest.freeServer() ;
     }
     

http://git-wip-us.apache.org/repos/asf/jena/blob/926fc524/jena-fuseki1/src/test/java/org/apache/jena/fuseki/http/TestDatasetAccessorHTTP.java
----------------------------------------------------------------------
diff --git 
a/jena-fuseki1/src/test/java/org/apache/jena/fuseki/http/TestDatasetAccessorHTTP.java
 
b/jena-fuseki1/src/test/java/org/apache/jena/fuseki/http/TestDatasetAccessorHTTP.java
index f7a652e..c6251f6 100644
--- 
a/jena-fuseki1/src/test/java/org/apache/jena/fuseki/http/TestDatasetAccessorHTTP.java
+++ 
b/jena-fuseki1/src/test/java/org/apache/jena/fuseki/http/TestDatasetAccessorHTTP.java
@@ -18,7 +18,15 @@
 
 package org.apache.jena.fuseki.http;
 
-import static org.apache.jena.fuseki.ServerTest.* ;
+import static org.apache.jena.fuseki.ServerTest.datasetPath ;
+import static org.apache.jena.fuseki.ServerTest.gn1 ;
+import static org.apache.jena.fuseki.ServerTest.gn2 ;
+import static org.apache.jena.fuseki.ServerTest.gn99 ;
+import static org.apache.jena.fuseki.ServerTest.model1 ;
+import static org.apache.jena.fuseki.ServerTest.model2 ;
+import static org.apache.jena.fuseki.ServerTest.port ;
+import static org.apache.jena.fuseki.ServerTest.serviceREST ;
+
 import org.apache.jena.atlas.junit.BaseTest ;
 import org.apache.jena.atlas.web.HttpException ;
 import org.apache.jena.fuseki.ServerTest ;
@@ -28,8 +36,8 @@ import org.apache.jena.rdf.model.Model ;
 import org.apache.jena.rdf.model.ModelFactory ;
 import org.apache.jena.riot.web.HttpOp ;
 import org.apache.jena.web.HttpSC ;
+import org.junit.After ;
 import org.junit.AfterClass ;
-import org.junit.Before ;
 import org.junit.BeforeClass ;
 import org.junit.Test ;
 
@@ -40,9 +48,9 @@ public class TestDatasetAccessorHTTP extends BaseTest
     static final String datasetURI_not_2    = serviceREST+"/not" ;
     static final String datasetURI_not_3    = 
"http://localhost:"+port+datasetPath+"/not/data"; ;
     
-    @BeforeClass public static void beforeClass()   { ServerTest.allocServer() 
; }
-    @AfterClass public static void afterClass()     { ServerTest.freeServer() 
; }
-    @Before public void before()                    { ServerTest.resetServer() 
; }
+    @BeforeClass public static void beforeClass()  { ServerTest.allocServer() 
; }
+    @AfterClass  public static void afterClass()   { ServerTest.freeServer() ; 
}
+    @After       public void after()               { ServerTest.resetServer() 
; }
     
     @Test(expected=HttpException.class)
     public void test_ds_1()

http://git-wip-us.apache.org/repos/asf/jena/blob/926fc524/jena-fuseki1/src/test/java/org/apache/jena/fuseki/http/TestDatasetGraphAccessorHTTP.java
----------------------------------------------------------------------
diff --git 
a/jena-fuseki1/src/test/java/org/apache/jena/fuseki/http/TestDatasetGraphAccessorHTTP.java
 
b/jena-fuseki1/src/test/java/org/apache/jena/fuseki/http/TestDatasetGraphAccessorHTTP.java
index 8794ba3..723103a 100644
--- 
a/jena-fuseki1/src/test/java/org/apache/jena/fuseki/http/TestDatasetGraphAccessorHTTP.java
+++ 
b/jena-fuseki1/src/test/java/org/apache/jena/fuseki/http/TestDatasetGraphAccessorHTTP.java
@@ -22,15 +22,15 @@ import org.apache.jena.fuseki.ServerTest ;
 import org.apache.jena.web.AbstractTestDatasetGraphAccessor ;
 import org.apache.jena.web.DatasetGraphAccessor ;
 import org.apache.jena.web.DatasetGraphAccessorHTTP ;
+import org.junit.After ;
 import org.junit.AfterClass ;
-import org.junit.Before ;
 import org.junit.BeforeClass ;
 
 public class TestDatasetGraphAccessorHTTP extends 
AbstractTestDatasetGraphAccessor
 {
-    @BeforeClass public static void beforeClass() { ServerTest.allocServer() ; 
}
-    @AfterClass public static void afterClass()   { ServerTest.freeServer() ; }
-    @Before public void before()                  { ServerTest.resetServer() ; 
} 
+    @BeforeClass public static void beforeClass()  { ServerTest.allocServer() 
; }
+    @AfterClass  public static void afterClass()   { ServerTest.freeServer() ; 
}
+    @After       public void after()               { ServerTest.resetServer() 
; }
     
     @Override
     protected DatasetGraphAccessor getDatasetUpdater()

Reply via email to