Use constant from RestApiServlet to skip JSON_MAGIC in acceptance tests
Change-Id: I9ebde3265a58eeafe0546733c9c962de28a3cb26 Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
This commit is contained in:
@@ -14,6 +14,8 @@
|
||||
|
||||
package com.google.gerrit.acceptance;
|
||||
|
||||
import static com.google.gerrit.httpd.restapi.RestApiServlet.JSON_MAGIC;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.Reader;
|
||||
@@ -37,7 +39,7 @@ public class RestSession {
|
||||
HttpGet get = new HttpGet("http://localhost:8080/a" + endPoint);
|
||||
HttpResponse response = getClient().execute(get);
|
||||
Reader reader = new InputStreamReader(response.getEntity().getContent());
|
||||
reader.skip(4);
|
||||
reader.skip(JSON_MAGIC.length);
|
||||
return reader;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user