You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@usergrid.apache.org by sf...@apache.org on 2015/07/10 01:29:34 UTC

[1/2] incubator-usergrid git commit: add job id

Repository: incubator-usergrid
Updated Branches:
  refs/heads/two-dot-o-dev f727814ba -> 48689eb5d


add job id


Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/8ca43238
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/8ca43238
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/8ca43238

Branch: refs/heads/two-dot-o-dev
Commit: 8ca4323850bbd483093315323e11f3e2261908d7
Parents: f727814
Author: Shawn Feldman <sf...@apache.org>
Authored: Thu Jul 9 17:27:39 2015 -0600
Committer: Shawn Feldman <sf...@apache.org>
Committed: Thu Jul 9 17:27:39 2015 -0600

----------------------------------------------------------------------
 .../main/java/org/apache/usergrid/rest/IndexResource.java   | 4 ++--
 .../test/java/org/apache/usergrid/rest/IndexResourceIT.java | 9 +++++++++
 2 files changed, 11 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/8ca43238/stack/rest/src/main/java/org/apache/usergrid/rest/IndexResource.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/main/java/org/apache/usergrid/rest/IndexResource.java b/stack/rest/src/main/java/org/apache/usergrid/rest/IndexResource.java
index d27cf98..a4a56bc 100644
--- a/stack/rest/src/main/java/org/apache/usergrid/rest/IndexResource.java
+++ b/stack/rest/src/main/java/org/apache/usergrid/rest/IndexResource.java
@@ -81,8 +81,8 @@ public class IndexResource extends AbstractContextResource {
 
     @RequireSystemAccess
     @GET
-    @Path( "rebuild" )
-    public JSONWithPadding rebuildIndexesGet(@QueryParam( "jobId" ) String jobId, @QueryParam( "callback" ) @DefaultValue( "callback" ) String callback )
+    @Path( "rebuild/{jobId}" )
+    public JSONWithPadding rebuildIndexesGet(@PathParam( "jobId" ) String jobId, @QueryParam( "callback" ) @DefaultValue( "callback" ) String callback )
         throws Exception {
         logger.info("Getting status for index jobs");
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/8ca43238/stack/rest/src/test/java/org/apache/usergrid/rest/IndexResourceIT.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/IndexResourceIT.java b/stack/rest/src/test/java/org/apache/usergrid/rest/IndexResourceIT.java
index 7820358..d09e1ad 100644
--- a/stack/rest/src/test/java/org/apache/usergrid/rest/IndexResourceIT.java
+++ b/stack/rest/src/test/java/org/apache/usergrid/rest/IndexResourceIT.java
@@ -84,6 +84,15 @@ public class IndexResourceIT extends org.apache.usergrid.rest.test.resource2poin
 
         assertNotNull( result );
 
+        WebResource res = clientSetup.getRestClient()
+            .pathResource( "system/index/rebuild/"+result.getProperties().get("jobId").toString() ).getResource();
+        //added httpBasicauth filter to all setup calls because they all do verification this way.
+        HTTPBasicAuthFilter httpBasicAuthFilter = new HTTPBasicAuthFilter( clientSetup.getSuperuserName(),clientSetup.getSuperuserPassword() );
+        res.addFilter( httpBasicAuthFilter );
+        result = res.get(ApiResponse.class);
+        assertNotNull( result );
+
+
     }
 
     @Ignore


[2/2] incubator-usergrid git commit: add job id

Posted by sf...@apache.org.
add job id


Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/48689eb5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/48689eb5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/48689eb5

Branch: refs/heads/two-dot-o-dev
Commit: 48689eb5d7deb815e24f85804d6a313ac9131b39
Parents: 8ca4323
Author: Shawn Feldman <sf...@apache.org>
Authored: Thu Jul 9 17:29:26 2015 -0600
Committer: Shawn Feldman <sf...@apache.org>
Committed: Thu Jul 9 17:29:26 2015 -0600

----------------------------------------------------------------------
 .../src/test/java/org/apache/usergrid/rest/IndexResourceIT.java   | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/48689eb5/stack/rest/src/test/java/org/apache/usergrid/rest/IndexResourceIT.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/IndexResourceIT.java b/stack/rest/src/test/java/org/apache/usergrid/rest/IndexResourceIT.java
index d09e1ad..d6b73e9 100644
--- a/stack/rest/src/test/java/org/apache/usergrid/rest/IndexResourceIT.java
+++ b/stack/rest/src/test/java/org/apache/usergrid/rest/IndexResourceIT.java
@@ -35,6 +35,7 @@ import javax.ws.rs.core.MediaType;
 import java.util.HashMap;
 import java.util.Map;
 
+import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.fail;
 
@@ -86,11 +87,13 @@ public class IndexResourceIT extends org.apache.usergrid.rest.test.resource2poin
 
         WebResource res = clientSetup.getRestClient()
             .pathResource( "system/index/rebuild/"+result.getProperties().get("jobId").toString() ).getResource();
+        String status = result.getProperties().get("jobId").toString();
         //added httpBasicauth filter to all setup calls because they all do verification this way.
         HTTPBasicAuthFilter httpBasicAuthFilter = new HTTPBasicAuthFilter( clientSetup.getSuperuserName(),clientSetup.getSuperuserPassword() );
         res.addFilter( httpBasicAuthFilter );
         result = res.get(ApiResponse.class);
         assertNotNull( result );
+        assertEquals(status,result.getProperties().get("jobId").toString());
 
 
     }