Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Fix SA reports in MT, an support operator strategies in MT #1168

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Prev Previous commit
Next Next commit
Support Windows build - it changes report comparison
Signed-off-by: Didier Vidal <didier.vidal_externe@rte-france.com>
  • Loading branch information
vidaldid-rte committed Jan 9, 2025
commit 01e021d0e3af3dc8e63b0ea5b28eeab979178307
Original file line number Diff line number Diff line change
@@ -3746,9 +3746,12 @@ void multiComponentSaTest(int threadCount) throws IOException {

StringWriter sw = new StringWriter();
testReport.print(sw);
// Remove Windows EOL
String reportString = sw.toString().replaceAll("\\r$", "");

// The purpose of this test is to check that the report have the same size with one or two threadd
// The content should be the same, but not the order...
assertEquals(7278, sw.toString().length());
assertEquals(7278, reportString.length());
// Check also that the preCont report is before the postContResults in the second CC
String expected =
" + Network CC1 SC1\n" +
@@ -3762,7 +3765,7 @@ void multiComponentSaTest(int threadCount) throws IOException {
" Outer loop VoltageMonitoring\n" +
" Outer loop ReactiveLimits\n" +
" AC load flow completed successfully (solverStatus=CONVERGED, outerloopStatus=STABLE)";
assertTrue(sw.toString().contains(expected));
assertTrue(reportString.contains(expected));
}

@ParameterizedTest
@@ -3845,9 +3848,11 @@ void multiComponentSaTestContingencyBothComponentsAndOperatorStrategy(int thread

StringWriter sw = new StringWriter();
reportNode.print(sw);
// Remove Windows EOL
String reportString = sw.toString().replaceAll("\\r$", "");
vidaldid-rte marked this conversation as resolved.
Show resolved Hide resolved
// The purpose of this test is to check that the report have the same size with one or two threadd
// The content should be the same, but not the order...
assertEquals(14292, sw.toString().length());
assertEquals(14292, reportString.length());
}

/**
Loading