Skip to content

Commit 26bfd8f

Browse files
committed
fixing the tests
1 parent d0924f8 commit 26bfd8f

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

test/java/src/junit/bowler/MuJoCoBowlerIntegrationTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public void test() throws Exception {
4949
terrain= (ArrayList<CSG>) ScriptingEngine.gitScriptRun(CSGDatabase.getInstance(),
5050
"https://github.com/madhephaestus/VexHighStakes2024.git",
5151
"field.groovy");
52-
com.neuronrobotics.sdk.common.Log.error("Parts size = "+parts.size());
52+
com.neuronrobotics.sdk.common.Log.debug("Parts size = "+parts.size());
5353
//terrain.add(new Cube(10000,10000,100).toCSG().toZMax());
5454
free.addAll(parts);
5555
MuJoCoPhysicsManager manager = new MuJoCoPhysicsManager(CSGDatabase.getInstance(),"javaCadTest", bases, free, terrain, new File("./physicsTest"));
@@ -68,7 +68,7 @@ public void test() throws Exception {
6868
}
6969
fail("Real time broken! "+took+" instead of expected "+manager.getCurrentSimulationTimeSeconds());
7070
}else {
71-
com.neuronrobotics.sdk.common.Log.error("Time "+now);
71+
com.neuronrobotics.sdk.common.Log.debug("Time "+now);
7272
}
7373
long timeSinceStart = System.currentTimeMillis()-start;
7474
double sec = ((double)timeSinceStart)/1000.0;

test/java/src/junit/bowler/TestCheckout.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
import com.neuronrobotics.bowlerstudio.BowlerKernel;
1717
import com.neuronrobotics.bowlerstudio.scripting.ScriptingEngine;
18+
import com.neuronrobotics.sdk.common.Log;
1819

1920
import javafx.application.Platform;
2021
import javafx.scene.control.MenuItem;
@@ -25,22 +26,22 @@ public void setup() throws InvalidRemoteException, TransportException, IOExcepti
2526
BowlerKernel.startupProcedures();
2627
}
2728
@Test
28-
public void test() throws IOException, GitAPIException {
29+
public void test() throws IOException, GitAPIException, InterruptedException {
2930
String url = "https://github.com/OperationSmallKat/greycat.git";
3031
Collection<Ref> branches = ScriptingEngine.getAllBranches(url);
3132
for(Ref select:branches) {
3233
try {
3334
String []name = select.getName().split("/");
3435
String myName = name[name.length-1];
35-
com.neuronrobotics.sdk.common.Log.error("Selecting Branch\r\n"+url+" \t\t"+myName);
36+
com.neuronrobotics.sdk.common.Log.debug("Selecting Branch\r\n"+url+" \t\t"+myName);
3637
String was = ScriptingEngine.getBranch(url);
3738
ScriptingEngine.checkout(url, myName);
3839
String s = ScriptingEngine.getBranch(url);
3940
assertTrue("Changing from "+was+" to "+myName+" got "+s,myName.contains(s));
4041

4142
} catch (Exception e) {
42-
// Auto-generated catch block
43-
e.printStackTrace();
43+
Log.error(e);
44+
Thread.sleep(1000);
4445
fail();
4546
}
4647
}

0 commit comments

Comments
 (0)