Commit 630cf81a authored by Sheng Wang's avatar Sheng Wang
Browse files

add more logs to SchemaUtil, LegalTagUtils and EntityUtil

parent 82cd5f1c
Pipeline #22105 failed with stages
in 10 minutes and 40 seconds
......@@ -32,6 +32,7 @@ public class EntityUtil {
ClientResponse response = TestUtils.send(getEntityUrl(), path, "PUT", headers, body, "");
Assert.assertEquals(HttpStatus.SC_CREATED, response.getStatus());
Thread.sleep(100);
System.out.println(String.format("created entity: %s-%s", type, id));
long version = getVersion(response, type, id);
return version;
}
......@@ -58,6 +59,7 @@ public class EntityUtil {
Map<String, String> headers = HeaderUtils.getHeaders(TenantUtils.getTenantName(), token);
ClientResponse response = TestUtils.send(getEntityUrl(), path, "DELETE", headers, "", "");
Assert.assertEquals(HttpStatus.SC_NO_CONTENT, response.getStatus());
System.out.println(String.format("deleted entity: %s-%s", type, id));
return response;
}
......@@ -66,6 +68,7 @@ public class EntityUtil {
Map<String, String> headers = HeaderUtils.getHeaders(TenantUtils.getTenantName(), token);
ClientResponse response = TestUtils.send(getEntityUrl(), path, "DELETE", headers, "", "");
Assert.assertEquals(HttpStatus.SC_NO_CONTENT, response.getStatus());
System.out.println(String.format("purged entity: %s-%s", type, id));
return response;
}
......@@ -84,6 +87,7 @@ public class EntityUtil {
Map<String, String> headers = HeaderUtils.getHeaders(TenantUtils.getTenantName(), token);
ClientResponse response = TestUtils.send(getEntityUrl(), path, "DELETE", headers, "", "");
Assert.assertEquals(HttpStatus.SC_NO_CONTENT, response.getStatus());
System.out.println(String.format("deleted entity version: %s-%s:%d", type, id, version));
return response;
}
......@@ -92,6 +96,7 @@ public class EntityUtil {
Map<String, String> headers = HeaderUtils.getHeaders(TenantUtils.getTenantName(), token);
ClientResponse response = TestUtils.send(getEntityUrl(), path, "DELETE", headers, "", "");
Assert.assertEquals(HttpStatus.SC_NO_CONTENT, response.getStatus());
System.out.println(String.format("purged entity version: %s-%s:%d", type, id, version));
return response;
}
......
......@@ -38,11 +38,14 @@ public class LegalTagUtils {
assertEquals(HttpStatus.SC_CREATED, response.getStatus());
Thread.sleep(100);
System.out.println(String.format("created legal tag: %s", name));
return response;
}
public static ClientResponse delete(String legalTagName, String token) throws Exception {
return TestUtils.send(getLegalUrl(), "legaltags/" + legalTagName, "DELETE", HeaderUtils.getHeaders(TenantUtils.getTenantName(), token), "", "");
ClientResponse response = TestUtils.send(getLegalUrl(), "legaltags/" + legalTagName, "DELETE", HeaderUtils.getHeaders(TenantUtils.getTenantName(), token), "", "");
System.out.println(String.format("deleted legal tag: %s", legalTagName));
return response;
}
protected static String getLegalUrl() {
......
......@@ -26,6 +26,7 @@ public class SchemaUtil {
ClientResponse response = TestUtils.send(getSchemaUrl(), "schema", "PUT", HeaderUtils.getHeaders(TenantUtils.getTenantName(), token), body,"");
assertEquals(HttpStatus.SC_OK, response.getStatus());
Thread.sleep(100);
System.out.println("created schema.");
return response;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment