Skip to content

Commit e3422d7

Browse files
authored
Merge branch 'master' into smokeTestFix
2 parents b3b3d82 + fe18102 commit e3422d7

File tree

4 files changed

+58
-4
lines changed

4 files changed

+58
-4
lines changed

buildSrc/src/main/groovy/com/google/firebase/gradle/plugins/publish/PublishingPlugin.groovy

+6-3
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,15 @@ class PublishingPlugin implements Plugin<Project> {
104104
from sub.components.android
105105
pom {
106106
licenses {
107-
//TODO(vkryachko): change to apache2 before open-sourcing.
108107
license {
109-
name = 'Android Software Development Kit License'
110-
url = 'https://developer.android.com/studio/terms.html'
108+
name = 'The Apache Software License, Version 2.0'
109+
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
111110
}
112111
}
112+
scm {
113+
connection = 'scm:git:https://github.com/firebase/firebase-android-sdk.git'
114+
url = 'https://github.com/firebase/firebase-android-sdk'
115+
}
113116
}
114117
publisher.decorate(sub, it)
115118
}

firebase-firestore/src/androidTest/java/com/google/firebase/firestore/ArrayTransformsTest.java

+4
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
import java.util.Map;
2828
import org.junit.After;
2929
import org.junit.Before;
30+
import org.junit.Rule;
3031
import org.junit.Test;
3132
import org.junit.runner.RunWith;
3233

@@ -37,6 +38,9 @@
3738
*/
3839
@RunWith(AndroidJUnit4.class)
3940
public class ArrayTransformsTest {
41+
// TODO(b/114769487): These tests have been flaky in CI so temporarily retrying.
42+
@Rule public RetryRule retryRule = new RetryRule(3);
43+
4044
// A document reference to read and write to.
4145
private DocumentReference docRef;
4246

firebase-firestore/src/androidTest/java/com/google/firebase/firestore/POJOTest.java

-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929

3030
@RunWith(AndroidJUnit4.class)
3131
public class POJOTest {
32-
3332
public static class POJO {
3433

3534
double number;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
// Copyright 2018 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
package com.google.firebase.firestore;
16+
17+
import org.junit.rules.TestRule;
18+
import org.junit.runner.Description;
19+
import org.junit.runners.model.Statement;
20+
21+
public class RetryRule implements TestRule {
22+
private int retryCount;
23+
24+
public RetryRule(int retryCount) {
25+
this.retryCount = retryCount;
26+
}
27+
28+
public Statement apply(final Statement base, Description description) {
29+
return new Statement() {
30+
@Override
31+
public void evaluate() throws Throwable {
32+
Throwable caughtThrowable = null;
33+
34+
for (int i = 0; i < retryCount; i++) {
35+
System.out.println("Trying...." + i);
36+
try {
37+
base.evaluate();
38+
return;
39+
} catch (Throwable t) {
40+
caughtThrowable = t;
41+
}
42+
}
43+
44+
throw caughtThrowable;
45+
}
46+
};
47+
}
48+
}

0 commit comments

Comments
 (0)