Skip to content

Commit 2211a40

Browse files
authored
Rename options.devMode to options.automatedTestMode (#1664)
1 parent 5f3facd commit 2211a40

14 files changed

+55
-55
lines changed

dart/lib/src/hub.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ class Hub {
277277
exception: exception,
278278
stackTrace: stackTrace,
279279
);
280-
if (_options.devMode) {
280+
if (_options.automatedTestMode) {
281281
rethrow;
282282
}
283283
}
@@ -377,7 +377,7 @@ class Hub {
377377
SentryLevel.error,
378378
"Error in the 'configureScope' callback, error: $err",
379379
);
380-
if (_options.devMode) {
380+
if (_options.automatedTestMode) {
381381
rethrow;
382382
}
383383
}

dart/lib/src/scope.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ class Scope {
178178
exception: exception,
179179
stackTrace: stackTrace,
180180
);
181-
if (_options.devMode) {
181+
if (_options.automatedTestMode) {
182182
rethrow;
183183
}
184184
}
@@ -345,7 +345,7 @@ class Scope {
345345
exception: exception,
346346
stackTrace: stackTrace,
347347
);
348-
if (_options.devMode) {
348+
if (_options.automatedTestMode) {
349349
rethrow;
350350
}
351351
}

dart/lib/src/sentry.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ class Sentry {
5858
exception: exception,
5959
stackTrace: stackTrace,
6060
);
61-
if (sentryOptions.devMode) {
61+
if (sentryOptions.automatedTestMode) {
6262
rethrow;
6363
}
6464
}

dart/lib/src/sentry_client.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ class SentryClient {
401401
exception: exception,
402402
stackTrace: stackTrace,
403403
);
404-
if (_options.devMode) {
404+
if (_options.automatedTestMode) {
405405
rethrow;
406406
}
407407
}
@@ -438,7 +438,7 @@ class SentryClient {
438438
exception: exception,
439439
stackTrace: stackTrace,
440440
);
441-
if (_options.devMode) {
441+
if (_options.automatedTestMode) {
442442
rethrow;
443443
}
444444
}

dart/lib/src/sentry_options.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -353,10 +353,10 @@ class SentryOptions {
353353
/// are set.
354354
bool? enableTracing;
355355

356-
/// Changed SDK behaviour when set to true:
356+
/// Only for internal use. Changed SDK behaviour when set to true:
357357
/// - Rethrow exceptions that occur in user provided closures
358358
@internal
359-
bool devMode = false;
359+
bool automatedTestMode = false;
360360

361361
SentryOptions({this.dsn, PlatformChecker? checker}) {
362362
if (checker != null) {

dart/lib/src/sentry_traces_sampler.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class SentryTracesSampler {
4040
exception: exception,
4141
stackTrace: stackTrace,
4242
);
43-
if (_options.devMode) {
43+
if (_options.automatedTestMode) {
4444
rethrow;
4545
}
4646
}

dart/test/environment_test.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ void main() {
2323
release: 'release-9.8.7',
2424
dist: 'bar',
2525
);
26-
options.devMode = true;
26+
options.automatedTestMode = true;
2727

2828
await Sentry.init(
2929
(options) => options,
@@ -44,7 +44,7 @@ void main() {
4444
release: 'release-9.8.7',
4545
dist: 'bar',
4646
);
47-
options.devMode = true;
47+
options.automatedTestMode = true;
4848

4949
await Sentry.init(
5050
(options) => options,

dart/test/event_processor/deduplication_event_processor_test.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ void main() {
7777

7878
final transport = MockTransport();
7979

80-
final options = SentryOptions(dsn: fakeDsn)..devMode = true;
80+
final options = SentryOptions(dsn: fakeDsn)..automatedTestMode = true;
8181
await Sentry.init(
8282
(options) {
8383
options.dsn = fakeDsn;

dart/test/event_processor/enricher/io_enricher_test.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ void main() {
159159
});
160160

161161
test('$IoEnricherEventProcessor gets added on init', () async {
162-
final options = SentryOptions(dsn: fakeDsn)..devMode = true;
162+
final options = SentryOptions(dsn: fakeDsn)..automatedTestMode = true;
163163
late SentryOptions configuredOptions;
164164
await Sentry.init(
165165
(options) {

dart/test/initialization_test.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ void main() {
1414
});
1515

1616
test('async re-initilization', () async {
17-
final options = SentryOptions(dsn: fakeDsn)..devMode = true;
17+
final options = SentryOptions(dsn: fakeDsn)..automatedTestMode = true;
1818
await Sentry.init(
1919
(options) {
2020
options.dsn = fakeDsn;
@@ -35,7 +35,7 @@ void main() {
3535
// This is the failure from
3636
// https://github.com/getsentry/sentry-dart/issues/508
3737
test('re-initilization', () async {
38-
final options = SentryOptions(dsn: fakeDsn)..devMode = true;
38+
final options = SentryOptions(dsn: fakeDsn)..automatedTestMode = true;
3939
await Sentry.init(
4040
(options) {
4141
options.dsn = fakeDsn;

dart/test/sentry_test.dart

+20-20
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ void main() {
1818
var anException = Exception();
1919

2020
setUp(() async {
21-
final options = SentryOptions(dsn: fakeDsn)..devMode = true;
21+
final options = SentryOptions(dsn: fakeDsn)..automatedTestMode = true;
2222
await Sentry.init(
2323
options: options,
2424
(options) => {
@@ -137,7 +137,7 @@ void main() {
137137
});
138138

139139
test('null DSN', () async {
140-
final options = SentryOptions(dsn: fakeDsn)..devMode = true;
140+
final options = SentryOptions(dsn: fakeDsn)..automatedTestMode = true;
141141
expect(
142142
() async => await Sentry.init(
143143
options: options,
@@ -150,7 +150,7 @@ void main() {
150150

151151
test('appRunner should be optional', () async {
152152
expect(Sentry.isEnabled, false);
153-
final options = SentryOptions(dsn: fakeDsn)..devMode = true;
153+
final options = SentryOptions(dsn: fakeDsn)..automatedTestMode = true;
154154
await Sentry.init(
155155
options: options,
156156
(options) => options.dsn = fakeDsn,
@@ -159,7 +159,7 @@ void main() {
159159
});
160160

161161
test('empty DSN', () async {
162-
final options = SentryOptions(dsn: fakeDsn)..devMode = true;
162+
final options = SentryOptions(dsn: fakeDsn)..automatedTestMode = true;
163163
await Sentry.init(
164164
options: options,
165165
(options) => options.dsn = '',
@@ -170,7 +170,7 @@ void main() {
170170
test('empty DSN disables the SDK but runs the integrations', () async {
171171
final integration = MockIntegration();
172172

173-
final options = SentryOptions(dsn: fakeDsn)..devMode = true;
173+
final options = SentryOptions(dsn: fakeDsn)..automatedTestMode = true;
174174
await Sentry.init(
175175
options: options,
176176
(options) {
@@ -183,7 +183,7 @@ void main() {
183183
});
184184

185185
test('close disables the SDK', () async {
186-
final options = SentryOptions(dsn: fakeDsn)..devMode = true;
186+
final options = SentryOptions(dsn: fakeDsn)..automatedTestMode = true;
187187
await Sentry.init(
188188
options: options,
189189
(options) => options.dsn = fakeDsn,
@@ -207,7 +207,7 @@ void main() {
207207
test('should install integrations', () async {
208208
final integration = MockIntegration();
209209

210-
final options = SentryOptions(dsn: fakeDsn)..devMode = true;
210+
final options = SentryOptions(dsn: fakeDsn)..automatedTestMode = true;
211211
await Sentry.init(
212212
options: options,
213213
(options) {
@@ -221,7 +221,7 @@ void main() {
221221

222222
test('should add default integrations', () async {
223223
late SentryOptions optionsReference;
224-
final options = SentryOptions(dsn: fakeDsn)..devMode = true;
224+
final options = SentryOptions(dsn: fakeDsn)..automatedTestMode = true;
225225
await Sentry.init(
226226
options: options,
227227
(options) {
@@ -245,7 +245,7 @@ void main() {
245245
}, onPlatform: {'browser': Skip()});
246246

247247
test('should add only web compatible default integrations', () async {
248-
final options = SentryOptions(dsn: fakeDsn)..devMode = true;
248+
final options = SentryOptions(dsn: fakeDsn)..automatedTestMode = true;
249249
await Sentry.init(
250250
options: options,
251251
(options) {
@@ -261,7 +261,7 @@ void main() {
261261
test('should close integrations', () async {
262262
final integration = MockIntegration();
263263

264-
final options = SentryOptions(dsn: fakeDsn)..devMode = true;
264+
final options = SentryOptions(dsn: fakeDsn)..automatedTestMode = true;
265265
await Sentry.init(
266266
options: options,
267267
(options) {
@@ -277,7 +277,7 @@ void main() {
277277
});
278278

279279
test('$DeduplicationEventProcessor is added on init', () async {
280-
final options = SentryOptions(dsn: fakeDsn)..devMode = true;
280+
final options = SentryOptions(dsn: fakeDsn)..automatedTestMode = true;
281281
await Sentry.init(
282282
options: options,
283283
(options) {
@@ -294,7 +294,7 @@ void main() {
294294
final completer = Completer();
295295
var completed = false;
296296

297-
final options = SentryOptions(dsn: fakeDsn)..devMode = true;
297+
final options = SentryOptions(dsn: fakeDsn)..automatedTestMode = true;
298298
final init = Sentry.init(
299299
options: options,
300300
(options) {
@@ -321,7 +321,7 @@ void main() {
321321
final completer = Completer();
322322
var completed = false;
323323

324-
final options = SentryOptions(dsn: fakeDsn)..devMode = true;
324+
final options = SentryOptions(dsn: fakeDsn)..automatedTestMode = true;
325325
final init = Sentry.init(
326326
options: options,
327327
(options) {
@@ -345,11 +345,11 @@ void main() {
345345

346346
test('options.environment debug', () async {
347347
final sentryOptions = SentryOptions(dsn: fakeDsn)
348-
..devMode = true
348+
..automatedTestMode = true
349349
..platformChecker = FakePlatformChecker.debugMode();
350350

351351
final options = SentryOptions();
352-
options.devMode = true;
352+
options.automatedTestMode = true;
353353
await Sentry.init(
354354
(options) {
355355
options.dsn = fakeDsn;
@@ -363,7 +363,7 @@ void main() {
363363
test('options.environment profile', () async {
364364
final sentryOptions =
365365
SentryOptions(dsn: fakeDsn, checker: FakePlatformChecker.profileMode())
366-
..devMode = true;
366+
..automatedTestMode = true;
367367

368368
await Sentry.init(
369369
(options) {
@@ -378,7 +378,7 @@ void main() {
378378
test('options.environment production (defaultEnvironment)', () async {
379379
final sentryOptions =
380380
SentryOptions(dsn: fakeDsn, checker: FakePlatformChecker.releaseMode())
381-
..devMode = true;
381+
..automatedTestMode = true;
382382
await Sentry.init(
383383
(options) {
384384
options.dsn = fakeDsn;
@@ -392,7 +392,7 @@ void main() {
392392
test('options.logger is set by setting the debug flag', () async {
393393
final sentryOptions =
394394
SentryOptions(dsn: fakeDsn, checker: FakePlatformChecker.debugMode())
395-
..devMode = true;
395+
..automatedTestMode = true;
396396

397397
await Sentry.init(
398398
(options) {
@@ -417,7 +417,7 @@ void main() {
417417

418418
test('throw is handled and logged', () async {
419419
final sentryOptions = SentryOptions(dsn: fakeDsn)
420-
..devMode = false
420+
..automatedTestMode = false
421421
..debug = true
422422
..logger = fixture.mockLogger;
423423

@@ -439,7 +439,7 @@ void main() {
439439

440440
test('throw is handled and logged', () async {
441441
final sentryOptions = SentryOptions(dsn: fakeDsn)
442-
..devMode = false
442+
..automatedTestMode = false
443443
..debug = true
444444
..logger = fixture.mockLogger;
445445

e2e_test/bin/e2e_test.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ void main(List<String> arguments) async {
2020
}
2121
final options = SentryOptions(dsn: _exampleDsn)
2222
// ignore: invalid_use_of_internal_member
23-
..devMode = true;
23+
..automatedTestMode = true;
2424
await Sentry.init(
2525
(options) {
2626
options.dsn = _exampleDsn;

flutter/test/initialization_test.dart

+4-4
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ void main() {
1818
(options) {
1919
options.dsn = fakeDsn;
2020
// ignore: invalid_use_of_internal_member
21-
options.devMode = true;
21+
options.automatedTestMode = true;
2222
},
2323
);
2424

@@ -28,7 +28,7 @@ void main() {
2828
(options) {
2929
options.dsn = fakeDsn;
3030
// ignore: invalid_use_of_internal_member
31-
options.devMode = true;
31+
options.automatedTestMode = true;
3232
},
3333
);
3434

@@ -42,7 +42,7 @@ void main() {
4242
(options) {
4343
options.dsn = fakeDsn;
4444
// ignore: invalid_use_of_internal_member
45-
options.devMode = true;
45+
options.automatedTestMode = true;
4646
},
4747
);
4848

@@ -52,7 +52,7 @@ void main() {
5252
(options) {
5353
options.dsn = fakeDsn;
5454
// ignore: invalid_use_of_internal_member
55-
options.devMode = true;
55+
options.automatedTestMode = true;
5656
},
5757
);
5858

0 commit comments

Comments
 (0)