Skip to content

Commit 958483c

Browse files
Increase connected check timeout for Firestore to 30m (#2889)
1 parent f69db30 commit 958483c

File tree

3 files changed

+18
-1
lines changed

3 files changed

+18
-1
lines changed

buildSrc/src/main/java/com/google/firebase/gradle/plugins/ci/device/FirebaseTestLabExtension.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,14 @@
1616

1717
import java.util.Collections;
1818
import java.util.Set;
19+
import javax.annotation.Nullable;
1920
import javax.inject.Inject;
2021
import org.gradle.api.model.ObjectFactory;
2122
import org.gradle.api.provider.SetProperty;
2223

2324
public class FirebaseTestLabExtension {
2425
private final SetProperty<String> devices;
26+
private String timeout;
2527
private boolean enabled;
2628

2729
@Inject
@@ -41,10 +43,19 @@ public void device(String device) {
4143
devices.add(device);
4244
}
4345

46+
public void timeout(String timeout) {
47+
this.timeout = timeout;
48+
}
49+
4450
Set<String> getDevices() {
4551
if (devices.get().isEmpty()) {
4652
return Collections.singleton("model=Pixel2,version=27,locale=en,orientation=portrait");
4753
}
4854
return devices.get();
4955
}
56+
57+
@Nullable
58+
public String getTimeout() {
59+
return timeout;
60+
}
5061
}

buildSrc/src/main/java/com/google/firebase/gradle/plugins/ci/device/FirebaseTestServer.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@ public void uploadApks(String variantName, File testApk, File testedApk) {
8989
.flatMap(device -> ImmutableList.of("--device", device).stream())
9090
.collect(Collectors.toList()));
9191

92+
Optional.ofNullable(extension.getTimeout())
93+
.ifPresent(timeout -> args.add("--timeout", timeout));
94+
9295
Optional.ofNullable(System.getenv("FTL_RESULTS_BUCKET"))
9396
.map(Environment::expand)
9497
.ifPresent(bucket -> args.add("--results-bucket", bucket));

firebase-firestore/firebase-firestore.gradle

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,11 @@ plugins {
1818
}
1919

2020
firebaseLibrary {
21-
testLab.enabled = true
2221
publishSources = true
22+
testLab {
23+
enabled = true
24+
timeout = '30m'
25+
}
2326
}
2427

2528
protobuf {

0 commit comments

Comments
 (0)