Skip to content
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@

package org.opensearch.gradle.testclusters;

import groovy.lang.Closure;
import org.opensearch.gradle.FileSystemOperationsAware;
import org.opensearch.gradle.test.Fixture;
import org.opensearch.gradle.util.GradleUtils;
Expand Down Expand Up @@ -60,6 +61,7 @@
public class StandaloneRestIntegTestTask extends Test implements TestClustersAware, FileSystemOperationsAware {

private Collection<OpenSearchCluster> clusters = new HashSet<>();
private Closure<Void> beforeStart;

public StandaloneRestIntegTestTask() {
this.getOutputs()
Expand All @@ -86,6 +88,18 @@ public StandaloneRestIntegTestTask() {
);
}

// Hook for executing any custom logic before starting the task.
public void setBeforeStart(Closure<Void> closure) {
beforeStart = closure;
}

@Override
public void beforeStart() {
if (beforeStart != null) {
beforeStart.call(this);
}
}

@Override
public int getMaxParallelForks() {
return 1;
Expand Down
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*/

plugins {
id "com.gradle.enterprise" version "3.8.1"
id "com.gradle.enterprise" version "3.10.3"
}

rootProject.name = "OpenSearch"
Expand Down