Skip to content

Commit 8ac5c4d

Browse files
committed
Merge branch 'main' into chore/format-and-analyze-check-only
2 parents 149a2e9 + 584e03b commit 8ac5c4d

File tree

3 files changed

+24
-14
lines changed

3 files changed

+24
-14
lines changed

.github/CODEOWNERS

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
* @marandaneto @krystofwoldrich @stefanosiano
1+
* @krystofwoldrich @stefanosiano @buenaflor

.github/workflows/flutter_integration_test.yml

+13-11
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
name: flutter integration tests
22
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/**'
1012

1113
jobs:
1214
cancel-previous-workflow:
@@ -26,15 +28,15 @@ jobs:
2628
strategy:
2729
fail-fast: false
2830
matrix:
29-
sdk: ['stable', 'beta']
31+
sdk: ["stable", "beta"]
3032
steps:
3133
- name: checkout
3234
uses: actions/checkout@v3
3335

3436
- uses: actions/setup-java@v3
3537
with:
36-
distribution: 'adopt'
37-
java-version: '11'
38+
distribution: "adopt"
39+
java-version: "11"
3840

3941
- uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa # [email protected]
4042
with:
@@ -93,7 +95,7 @@ jobs:
9395
fail-fast: false
9496
matrix:
9597
# 'beta' is flaky because of https://github.com/flutter/flutter/issues/124340
96-
sdk: ['stable']
98+
sdk: ["stable"]
9799
steps:
98100
- name: checkout
99101
uses: actions/checkout@v3

flutter/example/integration_test/integration_test.dart

+10-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// ignore_for_file: avoid_print
2+
13
import 'dart:async';
24
import 'dart:convert';
35

@@ -160,6 +162,7 @@ void main() {
160162
final uri = Uri.parse(
161163
'https://sentry.io/api/0/projects/$org/$slug/events/$id/',
162164
);
165+
expect(authToken, isNotEmpty);
163166

164167
final event = await fixture.poll(uri, authToken);
165168
expect(event, isNotNull);
@@ -206,26 +209,31 @@ class Fixture {
206209

207210
const maxRetries = 10;
208211
const initialDelay = Duration(seconds: 2);
209-
const factor = 2;
212+
const delayIncrease = Duration(seconds: 2);
210213

211214
var retries = 0;
212215
var delay = initialDelay;
213216

214217
while (retries < maxRetries) {
215218
try {
219+
print("Trying to fetch $url [try $retries/$maxRetries]");
216220
final response = await client.get(
217221
url,
218222
headers: <String, String>{'Authorization': 'Bearer $authToken'},
219223
);
224+
print("Response status code: ${response.statusCode}");
220225
if (response.statusCode == 200) {
221226
return jsonDecode(utf8.decode(response.bodyBytes));
227+
} else if (response.statusCode == 401) {
228+
print("Cannot fetch $url - invalid auth token.");
229+
break;
222230
}
223231
} catch (e) {
224232
// Do nothing
225233
} finally {
226234
retries++;
227235
await Future.delayed(delay);
228-
delay *= factor;
236+
delay += delayIncrease;
229237
}
230238
}
231239
return null;

0 commit comments

Comments
 (0)