Fix flaky gradle integration test
@@ -55,6 +55,9 @@ public class TestClustersPluginIT extends GradleIntegrationTestCase {
}
public void testUseClusterByUpToDateTask() {
+ // Run it once, ignoring the result and again to make sure it's considered up to date.
+ // Gradle randomly considers tasks without inputs and outputs as as up-to-date or success on the first run
+ getTestClustersRunner("upToDate1", "upToDate2").build();
BuildResult result = getTestClustersRunner("upToDate1", "upToDate2").build();
assertTaskUpToDate(result, ":upToDate1", ":upToDate2");
assertNotStarted(result);
