Skip to content
This repository was archived by the owner on Feb 22, 2018. It is now read-only.

Commit 5ff38bd

Browse files
committed
fix(scope): increase default ScopeDigestTTL to 10 iterations
1 parent 25d85fb commit 5ff38bd

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

lib/core/scope.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class ScopeEvent {
6565
@Injectable()
6666
class ScopeDigestTTL {
6767
final int ttl;
68-
ScopeDigestTTL(): ttl = 5;
68+
ScopeDigestTTL(): ttl = 10;
6969
ScopeDigestTTL.value(this.ttl);
7070
}
7171

@@ -678,7 +678,7 @@ class RootScope extends Scope {
678678
* [digest] calls the associated [ReactionFn]. Since a [ReactionFn] may further change the model,
679679
* [digest] processes changes multiple times until no more changes are detected.
680680
*
681-
* If the model does not stabilize within 5 iterations, an exception is thrown. See
681+
* If the model does not stabilize within 10 iterations, an exception is thrown. See
682682
* [ScopeDigestTTL].
683683
*/
684684
void digest() {

test/core/scope_spec.dart

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1218,11 +1218,11 @@ void main() {
12181218

12191219
expect(() {
12201220
rootScope.digest();
1221-
}).toThrow('Model did not stabilize in 5 digests. '
1222-
'Last 3 iterations:\n'
1223-
'a: 2 <= 1, b: 2 <= 1\n'
1224-
'a: 3 <= 2, b: 3 <= 2\n'
1225-
'a: 4 <= 3, b: 4 <= 3');
1221+
}).toThrow('Model did not stabilize in 10 digests. '
1222+
'Last 3 iterations:\n'
1223+
'a: 7 <= 6, b: 7 <= 6\n'
1224+
'a: 8 <= 7, b: 8 <= 7\n'
1225+
'a: 9 <= 8, b: 9 <= 8');
12261226
});
12271227

12281228

@@ -1232,7 +1232,7 @@ void main() {
12321232

12331233
expect(() {
12341234
rootScope.digest();
1235-
}).toThrow('Model did not stabilize in 5 digests. '
1235+
}).toThrow('Model did not stabilize in 10 digests. '
12361236
'Last 3 iterations:\n'
12371237
'async:1\n'
12381238
'async:1\n'

0 commit comments

Comments
 (0)