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:
Edwin Kempin
2013-02-13 13:04:03 +01:00
parent c991828e45
commit 8d71f29e1e
2 changed files with 4 additions and 2 deletions

View File

@@ -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;
}