Skip to content

Commit 58b7e40

Browse files
authored
Merge pull request #107 from opencb/TASK-7482
TASK-7482 - opencga junit tests failed
2 parents 2c98e01 + ed4feb8 commit 58b7e40

2 files changed

Lines changed: 15 additions & 1 deletion

File tree

commons-datastore/commons-datastore-mongodb/src/main/java/org/opencb/commons/datastore/mongodb/MongoDBNativeQuery.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,6 @@ public <T> MongoDBIterator<T> aggregate(ClientSession clientSession, List<? exte
118118
// we need to be sure that the List is mutable
119119
List<Bson> bsonOperations = new ArrayList<>(operations);
120120
parseQueryOptions(bsonOperations, options);
121-
System.out.println("bsonOperations = " + bsonOperations);
122121
MongoDBIterator<T> iterator = null;
123122
if (bsonOperations.size() > 0) {
124123
long numMatches = -1;

commons-lib/src/main/java/org/opencb/commons/utils/DockerUtils.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,21 @@ public static String run(String image, List<AbstractMap.SimpleEntry<String, Stri
203203
// Execute command
204204
Command cmd = new Command(commandLine);
205205
cmd.run();
206+
if (cmd.getExitValue() != 0) {
207+
String stderr = cmd.getError();
208+
int maxOutputContext = 1024;
209+
if (stderr.length() > maxOutputContext) {
210+
int length = stderr.length();
211+
stderr = " ... (length: " + length + ") " + stderr.substring(length - maxOutputContext);
212+
}
213+
String stdout = cmd.getOutput();
214+
if (stdout.length() > maxOutputContext) {
215+
int length = stdout.length();
216+
stdout = " ... (length: " + length + ") " + stdout.substring(length - maxOutputContext);
217+
}
218+
throw new IOException("Docker command failed with exit value " + cmd.getExitValue()
219+
+ ": stdout:" + stdout + " stderr:" + stderr);
220+
}
206221

207222
return commandLine;
208223
}

0 commit comments

Comments
 (0)