File tree 3 files changed +18
-18
lines changed
src/test/java/com/google/firebase/messaging
3 files changed +18
-18
lines changed Original file line number Diff line number Diff line change @@ -22,15 +22,5 @@ gpg --quiet --batch --yes --decrypt --passphrase="${FIREBASE_SERVICE_ACCT_KEY}"
22
22
23
23
echo " ${FIREBASE_API_KEY} " > integration_apikey.txt
24
24
25
- # Does the following:
26
- # 1. Runs the Checkstyle plugin (validate phase)
27
- # 2. Compiles the source (compile phase)
28
- # 3. Runs the unit tests (test phase)
29
- # 4. Packages the artifacts - src, bin, javadocs (package phase)
30
- # 5. Runs the integration tests (verify phase)
31
- mvn -B clean verify
25
+ mvn -B verify -Dcheckstyle.skip -DskipUTs
32
26
33
- # Maven target directory can consist of many files. Just copy the jar artifacts
34
- # into a new directory for upload.
35
- mkdir -p dist
36
- cp target/* .jar dist/
Original file line number Diff line number Diff line change @@ -50,10 +50,10 @@ jobs:
50
50
java-version : 1.7
51
51
52
52
- name : Compile, test and package
53
- run : ./.github/scripts/package_artifacts.sh
54
- env :
55
- FIREBASE_SERVICE_ACCT_KEY : ${{ secrets.FIREBASE_SERVICE_ACCT_KEY }}
56
- FIREBASE_API_KEY : ${{ secrets.FIREBASE_API_KEY }}
53
+ run : |
54
+ mvn -B clean package
55
+ mkdir -p dist/
56
+ cp target/*.jar dist/
57
57
58
58
# Attach the packaged artifacts to the workflow output. These can be manually
59
59
# downloaded for later inspection if necessary.
63
63
name : dist
64
64
path : dist
65
65
66
+ - name : Run integration tests
67
+ run : ./.github/scripts/run_integration_tests.sh
68
+ env :
69
+ FIREBASE_SERVICE_ACCT_KEY : ${{ secrets.FIREBASE_SERVICE_ACCT_KEY }}
70
+ FIREBASE_API_KEY : ${{ secrets.FIREBASE_API_KEY }}
71
+
66
72
publish_release :
67
73
needs : stage_release
68
74
Original file line number Diff line number Diff line change @@ -122,18 +122,22 @@ public void testSendFiveHundred() throws Exception {
122
122
123
123
BatchResponse response = FirebaseMessaging .getInstance ().sendAll (messages , true );
124
124
125
+ // This test appears to fail intermittently. Adjusting the structure of the test to help
126
+ // debug the issue.
125
127
assertEquals (500 , response .getResponses ().size ());
126
- assertEquals (500 , response .getSuccessCount ());
127
- assertEquals (0 , response .getFailureCount ());
128
128
for (SendResponse sendResponse : response .getResponses ()) {
129
129
if (!sendResponse .isSuccessful ()) {
130
130
sendResponse .getException ().printStackTrace ();
131
+ continue ;
131
132
}
132
- assertTrue ( sendResponse . isSuccessful ());
133
+
133
134
String id = sendResponse .getMessageId ();
134
135
assertTrue (id != null && id .matches ("^projects/.*/messages/.*$" ));
135
136
assertNull (sendResponse .getException ());
136
137
}
138
+
139
+ assertEquals (500 , response .getSuccessCount ());
140
+ assertEquals (0 , response .getFailureCount ());
137
141
}
138
142
139
143
@ Test
You can’t perform that action at this time.
0 commit comments