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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 2 additions & 2 deletions
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;

0 commit comments

Comments
 (0)