pushFailsOnFirstStageOutOfDate integration test.

This commit is contained in:
Winston Li
2015-03-09 23:56:16 +00:00
parent 4781a78926
commit 9245037abf
6 changed files with 96 additions and 3 deletions

View File

@@ -152,12 +152,14 @@ public class Util {
}
}
public static String fromStream(InputStream in) throws IOException
{
BufferedReader reader = new BufferedReader(new InputStreamReader(in));
public static String fromStream(InputStream stream, int skip) throws IOException {
BufferedReader reader = new BufferedReader(new InputStreamReader(stream));
StringBuilder out = new StringBuilder();
String newLine = System.getProperty("line.separator");
String line;
for (int i = 0; i < skip; i++) {
reader.readLine();
}
while ((line = reader.readLine()) != null) {
out.append(line);
out.append(newLine);
@@ -165,4 +167,8 @@ public class Util {
return out.toString();
}
public static String fromStream(InputStream stream) throws IOException {
return fromStream(stream, 0);
}
}