Skip to content

Commit fc8a38b

Browse files
committed
Add missing comments and parameter test
1 parent a3b1cc1 commit fc8a38b

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

packages/flutter/lib/parse_server_sdk_flutter.dart

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,16 @@ class Parse extends sdk.Parse
4747
/// ```
4848
/// [appName], [appVersion] and [appPackageName] are automatically set on Android and IOS, if they are not defined. You should provide a value on web.
4949
/// [fileDirectory] is not used on web
50+
///
51+
/// [restRetryIntervals] - Retry intervals in milliseconds for read operations.
52+
/// Applies to: GET, DELETE, and getBytes methods.
53+
/// Default: [0, 250, 500, 1000, 2000] (5 retry attempts with exponential backoff).
54+
/// Set to [] to disable retries for read operations.
55+
///
56+
/// [restRetryIntervalsForWrites] - Retry intervals in milliseconds for write operations.
57+
/// Applies to: POST, PUT, and postBytes methods.
58+
/// Default: [] (no retries to prevent duplicate data creation).
59+
/// Configure only if you have idempotency guarantees in place.
5060
@override
5161
Future<Parse> initialize(
5262
String appId,

packages/flutter/test/parse_client_configuration_test.dart

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ void main() {
1919
sessionId: 'sessionId',
2020
fileDirectory: 'someDirectory',
2121
debug: true,
22+
restRetryIntervals: [100, 200, 300],
23+
restRetryIntervalsForWrites: [500, 1000],
2224
);
2325

2426
// assert
@@ -33,5 +35,7 @@ void main() {
3335
expect(ParseCoreData().sessionId, 'sessionId');
3436
expect(ParseCoreData().debug, true);
3537
expect(ParseCoreData().fileDirectory, 'someDirectory');
38+
expect(ParseCoreData().restRetryIntervals, [100, 200, 300]);
39+
expect(ParseCoreData().restRetryIntervalsForWrites, [500, 1000]);
3640
});
3741
}

0 commit comments

Comments
 (0)