File tree 3 files changed +24
-14
lines changed
flutter/example/integration_test
3 files changed +24
-14
lines changed Original file line number Diff line number Diff line change 1
- * @ marandaneto @ krystofwoldrich @ stefanosiano
1
+ * @ krystofwoldrich @ stefanosiano @ buenaflor
Original file line number Diff line number Diff line change 1
1
name : flutter integration tests
2
2
on :
3
- push :
4
- branches :
5
- - main
6
- - release/**
7
- pull_request :
8
- paths-ignore :
9
- - ' file/**'
3
+ # Currently broken, enable after fixing
4
+ workflow_dispatch
5
+ # push:
6
+ # branches:
7
+ # - main
8
+ # - release/**
9
+ # pull_request:
10
+ # paths-ignore:
11
+ # - 'file/**'
10
12
11
13
jobs :
12
14
cancel-previous-workflow :
@@ -26,15 +28,15 @@ jobs:
26
28
strategy :
27
29
fail-fast : false
28
30
matrix :
29
- sdk : [' stable', ' beta' ]
31
+ sdk : [" stable", " beta" ]
30
32
steps :
31
33
- name : checkout
32
34
uses : actions/checkout@v3
33
35
34
36
- uses : actions/setup-java@v3
35
37
with :
36
- distribution : ' adopt'
37
- java-version : ' 11 '
38
+ distribution : " adopt"
39
+ java-version : " 11 "
38
40
39
41
-
uses :
subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa # [email protected]
40
42
with :
93
95
fail-fast : false
94
96
matrix :
95
97
# 'beta' is flaky because of https://github.com/flutter/flutter/issues/124340
96
- sdk : [' stable' ]
98
+ sdk : [" stable" ]
97
99
steps :
98
100
- name : checkout
99
101
uses : actions/checkout@v3
Original file line number Diff line number Diff line change
1
+ // ignore_for_file: avoid_print
2
+
1
3
import 'dart:async' ;
2
4
import 'dart:convert' ;
3
5
@@ -160,6 +162,7 @@ void main() {
160
162
final uri = Uri .parse (
161
163
'https://sentry.io/api/0/projects/$org /$slug /events/$id /' ,
162
164
);
165
+ expect (authToken, isNotEmpty);
163
166
164
167
final event = await fixture.poll (uri, authToken);
165
168
expect (event, isNotNull);
@@ -206,26 +209,31 @@ class Fixture {
206
209
207
210
const maxRetries = 10 ;
208
211
const initialDelay = Duration (seconds: 2 );
209
- const factor = 2 ;
212
+ const delayIncrease = Duration (seconds : 2 ) ;
210
213
211
214
var retries = 0 ;
212
215
var delay = initialDelay;
213
216
214
217
while (retries < maxRetries) {
215
218
try {
219
+ print ("Trying to fetch $url [try $retries /$maxRetries ]" );
216
220
final response = await client.get (
217
221
url,
218
222
headers: < String , String > {'Authorization' : 'Bearer $authToken ' },
219
223
);
224
+ print ("Response status code: ${response .statusCode }" );
220
225
if (response.statusCode == 200 ) {
221
226
return jsonDecode (utf8.decode (response.bodyBytes));
227
+ } else if (response.statusCode == 401 ) {
228
+ print ("Cannot fetch $url - invalid auth token." );
229
+ break ;
222
230
}
223
231
} catch (e) {
224
232
// Do nothing
225
233
} finally {
226
234
retries++ ;
227
235
await Future .delayed (delay);
228
- delay *= factor ;
236
+ delay += delayIncrease ;
229
237
}
230
238
}
231
239
return null ;
You can’t perform that action at this time.
0 commit comments