diff --git a/build.gradle b/build.gradle index 882f49e8..2b30af41 100644 --- a/build.gradle +++ b/build.gradle @@ -42,9 +42,8 @@ dependencies { api 'org.antlr:antlr4-runtime:4.5.3' // Used in OwrlBaseListener api 'com.github.masecla22:java-express:0.2.2' implementation 'ch.qos.logback:logback-classic:1.3.6' - //testImplementation group: 'junit', name: 'junit', version: '4.13.2' - testImplementation 'org.junit.jupiter:junit-jupiter-api:5.7.0' - testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.7.0' + testImplementation 'org.junit.jupiter:junit-jupiter-api:5.7.0' + //testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.7.0' } diff --git a/src/main/java/br/unicamp/cst/behavior/asbac/AffordanceExtractorCodelet.java b/src/main/java/br/unicamp/cst/behavior/asbac/AffordanceExtractorCodelet.java index 1f31fa54..b3f265d2 100644 --- a/src/main/java/br/unicamp/cst/behavior/asbac/AffordanceExtractorCodelet.java +++ b/src/main/java/br/unicamp/cst/behavior/asbac/AffordanceExtractorCodelet.java @@ -275,7 +275,7 @@ public List searchRelevantPercepts(AffordanceType aff, List pe * Preprocess and init the computation of the cartesian product. * @param aff * @param relevantPercepts - * @return a list of map + * @return a list of {@code Map} */ public List> getPerceptsCombinations(AffordanceType aff, Map> relevantPercepts){ diff --git a/src/main/java/br/unicamp/cst/core/entities/Codelet.java b/src/main/java/br/unicamp/cst/core/entities/Codelet.java index 4a4e885f..73f95cb4 100755 --- a/src/main/java/br/unicamp/cst/core/entities/Codelet.java +++ b/src/main/java/br/unicamp/cst/core/entities/Codelet.java @@ -801,6 +801,7 @@ public synchronized void setIsMemoryObserver(boolean isMemoryObserver) { this.isMemoryObserver = isMemoryObserver; } + @SuppressWarnings("empty-statement") public synchronized void setPublishSubscribe(boolean enable) { if (enable) { setIsMemoryObserver(true); @@ -812,8 +813,8 @@ public synchronized void setPublishSubscribe(boolean enable) { m.removeMemoryObserver(this); } setIsMemoryObserver(false); - //run(); - start(); + try { Thread.sleep(300); } catch(InterruptedException e) {}; + run(); } } diff --git a/src/test/java/br/unicamp/cst/core/profiler/TestMemoryObserver.java b/src/test/java/br/unicamp/cst/core/profiler/TestMemoryObserver.java index 3b16e393..82b8121d 100644 --- a/src/test/java/br/unicamp/cst/core/profiler/TestMemoryObserver.java +++ b/src/test/java/br/unicamp/cst/core/profiler/TestMemoryObserver.java @@ -364,6 +364,7 @@ public void proc() { m.insertCodelet(c); c.setPublishSubscribe(true); m.start(); + try { Thread.sleep(500); } catch(InterruptedException e) {} //setI in Memory Container and verify if Codelet was notified long ts = output.getTimestamp(); input.setI(0);