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

dulvac pushed a commit to branch master
in repository 
https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-clients.git


The following commit(s) were added to refs/heads/master by this push:
     new 3ad694e  SLING-7169 minor: fixed unit test
3ad694e is described below

commit 3ad694edb9ce00fa49fece5f6129fffddd10c036
Author: Andrei Dulvac <[email protected]>
AuthorDate: Thu Mar 29 13:00:34 2018 +0200

    SLING-7169 minor: fixed unit test
---
 .../testing/clients/indexing/IndexingClientTest.java | 20 +++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)

diff --git 
a/src/test/java/org/apache/sling/testing/clients/indexing/IndexingClientTest.java
 
b/src/test/java/org/apache/sling/testing/clients/indexing/IndexingClientTest.java
index a509a21..0fde485 100644
--- 
a/src/test/java/org/apache/sling/testing/clients/indexing/IndexingClientTest.java
+++ 
b/src/test/java/org/apache/sling/testing/clients/indexing/IndexingClientTest.java
@@ -149,6 +149,24 @@ public class IndexingClientTest {
                 }
             });
 
+            
serverBootstrap.registerHandler("/tmp/testing/waitForAsyncIndexing/oak:index/*",
 new HttpRequestHandler() {
+                @Override
+                public void handle(HttpRequest request, HttpResponse response, 
HttpContext context)
+                        throws HttpException, IOException {
+                    List<NameValuePair> params = extractParameters(request);
+
+                    for (NameValuePair param : params) {
+                        if (param.getName().equals(":operation") && 
(param.getValue().equals("delete"))) {
+                            response.setStatusCode(200);
+                            return;
+                        }
+                    }
+
+                    response.setStatusCode(200);
+                    response.setEntity(new StringEntity("Created!"));
+                }
+            });
+
             // unimportant requests
             serverBootstrap.registerHandler("/tmp.json", okHandler);
             serverBootstrap.registerHandler("/tmp/testing.json", okHandler);
@@ -163,7 +181,7 @@ public class IndexingClientTest {
 
     public IndexingClientTest() throws ClientException {
         client = new IndexingClient(httpServer.getURI(), "admin", "admin");
-        client = new 
IndexingClient(java.net.URI.create("http://localhost:4502";), "admin", "admin");
+        //client = new 
IndexingClient(java.net.URI.create("http://localhost:4502";), "admin", "admin");
     }
 
     @Test

-- 
To stop receiving notification emails like this one, please contact
[email protected].

Reply via email to