Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

Commit

Permalink
Add galasaecosystem.runs.timeout CPS prop to configure the timeout of…
Browse files Browse the repository at this point in the history
… nested ecosystem manager test runs (#973)

Signed-off-by: Eamonn Mansour <[email protected]>
  • Loading branch information
eamansour authored Aug 6, 2024
1 parent 3be2723 commit 72c74f0
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ plugins {

description = 'Galasa Ecosystem Manager'

version = '0.34.0'
version = '0.36.0'

dependencies {
implementation 'commons-io:commons-io:2.16.1'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
import dev.galasa.galasaecosystem.internal.properties.IsolatedFullZip;
import dev.galasa.galasaecosystem.internal.properties.IsolatedMvpZip;
import dev.galasa.galasaecosystem.internal.properties.MavenUseDefaultLocalRepository;
import dev.galasa.galasaecosystem.internal.properties.RunsTimeout;
import dev.galasa.galasaecosystem.internal.properties.RuntimeRepo;
import dev.galasa.galasaecosystem.internal.properties.RuntimeVersion;
import dev.galasa.galasaecosystem.internal.properties.SimBankTestsVersion;
Expand Down Expand Up @@ -102,6 +103,8 @@ public abstract class LocalEcosystemImpl extends AbstractEcosystemImpl implement

private IFramework framework;

private int runsTimeout;

public LocalEcosystemImpl(@NotNull GalasaEcosystemManagerImpl manager,
@NotNull String tag,
@NotNull IJavaInstallation javaInstallation,
Expand Down Expand Up @@ -171,6 +174,7 @@ protected void build(Path runHomeDirectory, Path homeDirectory) throws GalasaEco

this.galasaBootVersion = GalasaBootVersion.get();
this.simplatformVersion = SimplatformVersion.get();
this.runsTimeout = RunsTimeout.get();

switch(this.isolationInstallation) {
case Full:
Expand Down Expand Up @@ -382,7 +386,7 @@ private void downloadArtifactsViaMaven(Path homeDirectory) throws GalasaEcosyste

@Override
public JsonObject waitForRun(String runName) throws GalasaEcosystemManagerException {
return waitForRun(runName, 3);
return waitForRun(runName, runsTimeout);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/*
* Copyright contributors to the Galasa project
*
* SPDX-License-Identifier: EPL-2.0
*/
package dev.galasa.galasaecosystem.internal.properties;

import dev.galasa.framework.spi.cps.CpsProperties;
import dev.galasa.galasaecosystem.GalasaEcosystemManagerException;

/**
* Timeout for Galasa Ecosystem manager nested test runs
*
* In minutes, how long the Galasa Ecosystem manager should wait for nested runs to complete before
* timing out. The default timeout value is 3 minutes.
*
* The property is:-
* <code>galasaecosystem.runs.timeout</code>
*
*/
public class RunsTimeout extends CpsProperties {

private static final int DEFAULT_TIMEOUT_MINUTES = 3;

public static int get() throws GalasaEcosystemManagerException {
return getIntWithDefault(GalasaEcosystemPropertiesSingleton.cps(), DEFAULT_TIMEOUT_MINUTES, "runs", "timeout");
}

}
2 changes: 1 addition & 1 deletion release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ managers:
codecoverage: false

- artifact: dev.galasa.galasaecosystem.manager
version: 0.34.0
version: 0.36.0
obr: true
mvp: false
bom: true
Expand Down

0 comments on commit 72c74f0

Please sign in to comment.