From 0cd9ba0de7553a401bfb4a6aa08028f19c19c937 Mon Sep 17 00:00:00 2001 From: Elton Cardoso do Nascimento <43186596+EltonCN@users.noreply.github.com> Date: Thu, 28 Nov 2024 13:36:25 -0300 Subject: [PATCH] Sped Up CodeletTest Changed codelet timestep and sleeps Issue #63 solved --- src/test/java/br/unicamp/cst/core/entities/CodeletTest.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/test/java/br/unicamp/cst/core/entities/CodeletTest.java b/src/test/java/br/unicamp/cst/core/entities/CodeletTest.java index 720c999..d215b5a 100644 --- a/src/test/java/br/unicamp/cst/core/entities/CodeletTest.java +++ b/src/test/java/br/unicamp/cst/core/entities/CodeletTest.java @@ -199,6 +199,7 @@ public void getOutputEnableFalseTest(){ boolean exceptionThrown = false; Codelet testCodelet = null; testCodelet = generateCodelet(); + testCodelet.setTimeStep(50); testCodelet.setName("thisCodeletWillFail"); List dummyOutputs = Arrays.asList(new MemoryObject(), new MemoryObject()); testCodelet.setOutputs(dummyOutputs); @@ -211,7 +212,7 @@ public void getOutputEnableFalseTest(){ mind.insertCodelet(testCodelet); mind.start(); try{ - Thread.sleep(1000); + Thread.sleep(100); } catch (InterruptedException e) { @@ -368,6 +369,7 @@ public void getTimeStepTest(){ public void runProfilingTest(){ Codelet testCodelet = generateCodelet(); testCodelet.setProfiling(true); + testCodelet.setTimeStep(50); ByteArrayOutputStream outputStreamCaptor = new ByteArrayOutputStream(); System.setOut(new PrintStream(outputStreamCaptor)); @@ -376,7 +378,7 @@ public void runProfilingTest(){ mind.insertCodelet(testCodelet); mind.start(); try { - Thread.sleep(1000); + Thread.sleep(100); } catch (InterruptedException e) { e.printStackTrace(); }