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

MOSIP-37534--Exhausted the maximum suite execution time #699

Merged
merged 3 commits into from
Jan 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion mosip-acceptance-tests/ivv-orchestrator/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
<dependency>
<groupId>io.mosip.esignet</groupId>
<artifactId>apitest-esignet</artifactId>
<version>1.5.1-SNAPSHOT</version>
<version>1.5.1-develop-SNAPSHOT</version>
</dependency>

<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -271,8 +271,8 @@ private static String convertNanosToTime(long nanoseconds) {
public static String getExecutionTime() {
long duration = BaseTestCaseUtil.exectionEndTime - BaseTestCaseUtil.exectionStartTime;

// Convert nanoseconds to total seconds, minutes, and hours
long totalSeconds = duration / 1_000_000_000;
// Convert milliseconds to total seconds, minutes, and hours
long totalSeconds = duration / 1000;
long seconds = totalSeconds % 60;
long totalMinutes = totalSeconds / 60;
long minutes = totalMinutes % 60;
Expand Down Expand Up @@ -488,10 +488,13 @@ private int writeScenarioSummary(String description, List<ClassResult> classResu

String scenarioStart = BaseTestCaseUtil.sceanrioExecutionStatistics.get("Scenario_" + scenarioDetails[0] + "_startTime");
String scenarioEnd = BaseTestCaseUtil.sceanrioExecutionStatistics.get("Scenario_" + scenarioDetails[0] + "_endTime");
long endTime;
if (scenarioEnd == null || scenarioEnd.isEmpty())
endTime= System.nanoTime();
else
endTime = Long.parseLong(scenarioEnd);

long startTime = Long.parseLong(scenarioStart);
long endTime = Long.parseLong(scenarioEnd);

// Calculate the duration in milliseconds
long scenarioDuration = endTime - startTime;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public class Orchestrator {
@BeforeSuite
public void beforeSuite() {

suiteStartTime = System.nanoTime();
suiteStartTime = System.currentTimeMillis();
BaseTestCaseUtil.exectionStartTime = suiteStartTime;
logger.info("Suite start time is: " + BaseTestCaseUtil.exectionStartTime);
this.properties = Utils.getProperties(TestRunner.getExternalResourcePath() + "/config/config.properties");
Expand Down Expand Up @@ -131,7 +131,7 @@ public static void create_proxy_server() {

@AfterSuite
public void afterSuite() {
BaseTestCaseUtil.exectionEndTime = System.nanoTime();
BaseTestCaseUtil.exectionEndTime = System.currentTimeMillis();
logger.info("Suite end time is: " + BaseTestCaseUtil.exectionEndTime);
extent.flush();
}
Expand Down
Loading