Skip to content

Commit

Permalink
fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
paulbourelly999 committed Oct 25, 2023
1 parent 25ea36d commit 9ccc133
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,6 @@ public void initialize(long startTime, long endTime) throws InternalFederateExce
catch (MalformedURLException m)
{
log.error("Errors occurred with {}", m.getMessage());
carlaXmlRpcClient.closeConnection();
}
// Start the CARLA simulator
startCarlaLocal();
Expand Down Expand Up @@ -379,6 +378,7 @@ public synchronized void processTimeAdvanceGrant(long time) throws InternalFeder
}
catch (XmlRpcException e) {
log.error("Failed to connect to CARLA Adapter : ", e);
carlaXmlRpcClient.closeConnection();
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;

import org.eclipse.mosaic.fed.carla.carlaconnect.CarlaXmlRpcClient;
import org.eclipse.mosaic.lib.util.junit.TestFileRule;
import org.eclipse.mosaic.rti.TIME;
import org.eclipse.mosaic.rti.api.RtiAmbassador;
Expand Down Expand Up @@ -55,6 +56,8 @@ public void setup() throws IOException {

rtiMock = mock(RtiAmbassador.class);



FederateDescriptor handleMock = mock(FederateDescriptor.class);

File workingDir = temporaryFolder.getRoot();
Expand Down

0 comments on commit 9ccc133

Please sign in to comment.