Skip to content

Commit

Permalink
Add teardown to service tests to prevent results leaking to other tes…
Browse files Browse the repository at this point in the history
…ts (#34)

Signed-off-by: Hugo Marcellin <[email protected]>
  • Loading branch information
Meklo authored Sep 20, 2023
1 parent 56edde5 commit fbdd8fc
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import java.util.stream.Collectors;
import java.util.stream.Stream;

import lombok.SneakyThrows;
import org.gridsuite.sensitivityanalysis.server.ResultsSelector;
import org.gridsuite.sensitivityanalysis.server.SensitivityAnalysisApplication;
import org.gridsuite.sensitivityanalysis.server.dto.SensitivityAnalysisInputData;
Expand All @@ -25,6 +26,7 @@
import org.hamcrest.Matchers;
import org.hamcrest.collection.IsIterableContainingInOrder;
import org.hamcrest.core.Every;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
Expand Down Expand Up @@ -406,4 +408,10 @@ private void testNoN(boolean specific) {
assertThat(sensitivityVals, not(hasItem(500.2)));
assertThat(sensitivityVals, isOrderedAccordingTo(Comparator.<Double>naturalOrder()));
}

@SneakyThrows
@After
public void tearDown() {
analysisService.deleteResults();
}
}

0 comments on commit fbdd8fc

Please sign in to comment.