Skip to content

Commit 30c3788

Browse files
authored
Merge pull request #373 from BimberLab/fb_debugtest
Debug JBrowseTest failures
2 parents d9d4b13 + bae59c2 commit 30c3788

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

SequenceAnalysis/api-src/org/labkey/api/sequenceanalysis/run/AbstractCommandWrapper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ public Logger getLogger()
275275
return _log;
276276
}
277277

278-
protected void setLogLevel(Level logLevel)
278+
public void setLogLevel(Level logLevel)
279279
{
280280
_logLevel = logLevel;
281281
}

jbrowse/src/org/labkey/jbrowse/JBrowseManager.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
package org.labkey.jbrowse;
1818

1919
import org.apache.commons.lang3.SystemUtils;
20+
import org.apache.logging.log4j.Level;
2021
import org.apache.logging.log4j.LogManager;
2122
import org.apache.logging.log4j.Logger;
2223
import org.jetbrains.annotations.Nullable;
@@ -237,6 +238,8 @@ public void testJBrowseCli() throws Exception
237238
{
238239
File exe = JBrowseManager.get().getJbrowseCli();
239240
SimpleScriptWrapper wrapper = new SimpleScriptWrapper(_log);
241+
wrapper.setLogLevel(Level.INFO);
242+
wrapper.setLogPath(true);
240243
wrapper.setThrowNonZeroExits(false);
241244

242245
String output = wrapper.executeWithOutput(Arrays.asList(exe.getPath(), "help"));
@@ -247,6 +250,16 @@ public void testJBrowseCli() throws Exception
247250
_log.error("output: ");
248251
_log.error(output);
249252

253+
// Repeat without output going direct to the server log:
254+
try
255+
{
256+
wrapper.execute(Arrays.asList(exe.getPath(), "help"));
257+
}
258+
catch (Exception e)
259+
{
260+
// Ignore
261+
}
262+
250263
throw new RuntimeException("Non-zero exit running testJBrowseCli: " + wrapper.getLastReturnCode());
251264
}
252265

0 commit comments

Comments
 (0)