Skip to content

Commit

Permalink
Enable running multiple OMNeT tests by removing broken deinitialization
Browse files Browse the repository at this point in the history
code
  • Loading branch information
vladamatena committed Apr 21, 2015
1 parent ec4a6fd commit 0f75612
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public static void main(String[] args) throws AnnotationProcessorException, Inte
new VehicleTravelTest().testTravel();
}

@Test @Ignore("We currently cannot run multiple OMNeT based simulations")
@Test @Ignore("We currently cannot run multiple OMNeT based simulations AND this is not yet ready to work properly")
public void testTravel() throws AnnotationProcessorException, InterruptedException, DEECoException,
InstantiationException, IllegalAccessException, IOException {
OMNeTSimulation omnet = new OMNeTSimulation();
Expand Down
5 changes: 4 additions & 1 deletion jdeeco-omnet-plugin/src/simulation.cc
Original file line number Diff line number Diff line change
Expand Up @@ -205,12 +205,15 @@ void simulate(const char * envName, const char * confFile) {
cSimulation::setActiveSimulation(NULL);
delete simulationobject; // will delete app as well

/* TODO: Most probably we should have executed these, but for some reason it is
* not possible to start new simulation in the same VM when these are used. */
/*
componentTypes.clear();
nedFunctions.clear();
classes.clear();
enums.clear();
classDescriptors.clear();
configOptions.clear();
omnetapps.clear();
CodeFragments::executeAll(CodeFragments::SHUTDOWN);
CodeFragments::executeAll(CodeFragments::SHUTDOWN); */
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import java.util.Arrays;

import org.junit.Ignore;
import org.junit.Test;

import cz.cuni.mff.d3s.deeco.annotations.processor.AnnotationProcessorException;
Expand Down Expand Up @@ -30,8 +29,7 @@ public static void main(String[] args) throws AnnotationProcessorException, Inte
test.testConvoyOmnet();
}

// TODO: Can we really run OMNeT based integration tests?
@Test @Ignore("We are running the broadcast one, so it is not possible to run this one. Currently we can ruin just one simulation per VM instance")
@Test
public void testConvoyOmnet() throws AnnotationProcessorException, InterruptedException, DEECoException,
InstantiationException, IllegalAccessException {
OMNeTSimulation omnet = new OMNeTSimulation();
Expand Down

0 comments on commit 0f75612

Please sign in to comment.