marcglasberg / async_redux

Flutter Package: A Redux version tailored for Flutter, which is easy to learn, to use, to test, and has no boilerplate. Allows for both sync and async reducers.
Other
234 stars 40 forks source link

Unable to test PersistAction #47

Closed kuhnroyal closed 4 years ago

kuhnroyal commented 4 years ago

All StoreTester.wait* methods fail when using PersistAction as the Type can not be matched. I have not found a way to specify the correct type.

Maybe the matching can be enhanced to ignore the generic parameter of the PersistAction or some alternative wait* methods can be added that expect Matcher instances, like [isA<PersistAction<MyState>>(), equals(fooAction)].

Got this action: PersistAction<MyState> INI.
Was expecting: PersistAction<dynamic> INI.
gadfly361 commented 4 years ago

Here is the output I get when I run async_redux's tests (the failures are related to persistence):

matthew@ ~/gadfly/forks/async_redux (master) $ flutter test
00:02 +0: /Users/matthew/gadfly/forks/async_redux/test/store_tester_test.dart: Dispatch some actions and wait until some condition is met. Get the end state.          
New StoreTester.
D:1 R:0 = Action Action1 INI

D:1 R:1 = Action Action1 END

D:2 R:1 = Action Action2 INI

D:2 R:2 = Action Action2 END

D:3 R:2 = Action Action3 INI

D:3 R:3 = Action Action3 END

D:4 R:3 = Action Action4 INI

D:4 R:4 = Action Action4 END

00:02 +1: /Users/matthew/gadfly/forks/async_redux/test/store_tester_test.dart: Dispatch some actions and wait until some condition is met. Get the end state.          
New StoreTester.
D:1 R:0 = Action Action1 INI

D:1 R:1 = Action Action1 END

D:2 R:1 = Action Action2 INI

D:2 R:2 = Action Action2 END

D:3 R:2 = Action Action3 INI

D:3 R:3 = Action Action3 END

D:4 R:3 = Action Action4 INI

D:4 R:4 = Action Action4 END

00:02 +2: /Users/matthew/gadfly/forks/async_redux/test/store_tester_test.dart: Dispatch some actions and wait until some condition is met. Get all of the intermediary states (END only).
New StoreTester.
D:1 R:0 = Action Action1 INI

D:1 R:1 = Action Action1 END

D:2 R:1 = Action Action2 INI

D:2 R:2 = Action Action2 END

D:3 R:2 = Action Action3 INI

D:3 R:3 = Action Action3 END

D:4 R:3 = Action Action4 INI

D:4 R:4 = Action Action4 END

00:02 +3: /Users/matthew/gadfly/forks/async_redux/test/store_tester_test.dart: Dispatch some actions and wait until some condition is met. Get all of the intermediary states, including INI and END.
New StoreTester.
D:1 R:0 = Action Action1 INI

D:1 R:1 = Action Action1 END

D:2 R:1 = Action Action2 INI

D:2 R:2 = Action Action2 END

D:3 R:2 = Action Action3 INI

D:3 R:3 = Action Action3 END

D:4 R:3 = Action Action4 INI

D:4 R:4 = Action Action4 END

00:02 +5: /Users/matthew/gadfly/forks/async_redux/test/store_tester_test.dart: Dispatch some action and wait for it. Get the end state.                                
New StoreTester.
D:1 R:0 = Action Action1 INI

D:1 R:1 = Action Action1 END

00:02 +8: /Users/matthew/gadfly/forks/async_redux/test/store_tester_test.dart: Dispatch some action and wait for a different one. Gets an error.                       
New StoreTester.
D:1 R:0 = Action Action1 INI

D:1 R:1 = Action Action1 END

00:02 +9: /Users/matthew/gadfly/forks/async_redux/test/store_tester_test.dart: Dispatch a few actions and wait for all of them, in order. Get the end state.           
New StoreTester.
D:1 R:0 = Action Action1 INI

00:02 +9: /Users/matthew/gadfly/forks/async_redux/test/sync_async_test.dart: 1) A sync reducer is called, and no actions are dispatched inside of the reducer. It acts as a pure function, just like a regular reducer of "vanilla" Redux.
New StoreTester.
00:02 +9: /Users/matthew/gadfly/forks/async_redux/test/store_tester_test.dart: Dispatch a few actions and wait for all of them, in order. Get the end state.           
D:1 R:1 = Action Action1 END

D:2 R:1 = Action Action2 INI

D:2 R:2 = Action Action2 END

D:3 R:2 = Action Action3 INI

D:3 R:3 = Action Action3 END

00:02 +10: /Users/matthew/gadfly/forks/async_redux/test/sync_async_test.dart: 1) A sync reducer is called, and no actions are dispatched inside of the reducer. It acts as a pure function, just like a regular reducer of "vanilla" Redux.
D:1 R:0 = Action Action1B INI

D:1 R:1 = Action Action1B END

00:02 +10: /Users/matthew/gadfly/forks/async_redux/test/store_tester_test.dart: Dispatch a few actions and wait for all of them, in order. Get the end state.          
New StoreTester.
D:1 R:0 = Action Action6 INI

D:2 R:1 = Action Action1 INI

D:2 R:2 = Action Action1 END

D:3 R:2 = Action Action2 INI

D:3 R:3 = Action Action2 END

D:4 R:3 = Action Action3 INI

D:4 R:4 = Action Action3 END

D:4 R:4 = Action Action6 END

00:02 +12: /Users/matthew/gadfly/forks/async_redux/test/sync_async_test.dart: 2) A sync reducer is called, which dispatches another sync action. They are both executed synchronously.
New StoreTester.
D:1 R:0 = Action Action2B INI

D:2 R:1 = Action Action2C INI

D:2 R:2 = Action Action2C END

00:02 +12: /Users/matthew/gadfly/forks/async_redux/test/store_tester_test.dart: Dispatch a few actions and wait for all of them, in order. Gets an error because they are not in order.
New StoreTester.
00:02 +12: /Users/matthew/gadfly/forks/async_redux/test/sync_async_test.dart: 2) A sync reducer is called, which dispatches another sync action. They are both executed synchronously.
D:2 R:2 = Action Action2B END

00:02 +12: /Users/matthew/gadfly/forks/async_redux/test/store_tester_test.dart: Dispatch a few actions and wait for all of them, in order. Gets an error because they are not in order.
D:1 R:0 = Action Action1 INI

D:1 R:1 = Action Action1 END

D:2 R:1 = Action Action3 INI

D:2 R:2 = Action Action3 END

D:3 R:2 = Action Action2 INI

00:02 +13: /Users/matthew/gadfly/forks/async_redux/test/store_tester_test.dart: Dispatch a few actions and wait for all of them, in order. Gets an error because they are not in order.
D:3 R:3 = Action Action2 END

00:02 +14: /Users/matthew/gadfly/forks/async_redux/test/sync_async_test.dart: 3) A sync reducer is called, which dispatches an ASYNC action.                           
New StoreTester.
D:1 R:0 = Action Action3B INI

D:2 R:1 = Action Action3C INI

00:02 +14: /Users/matthew/gadfly/forks/async_redux/test/store_tester_test.dart: Dispatch a few actions and wait for all of them, in order. Gets an error because a different one was dispacthed in the middle.
New StoreTester.
D:1 R:0 = Action Action1 INI

D:1 R:1 = Action Action1 END

00:02 +14: /Users/matthew/gadfly/forks/async_redux/test/sync_async_test.dart: 3) A sync reducer is called, which dispatches an ASYNC action.                           
D:2 R:2 = Action Action3B END

00:02 +14: /Users/matthew/gadfly/forks/async_redux/test/store_tester_test.dart: Dispatch a few actions and wait for all of them, in order. Gets an error because a different one was dispacthed in the middle.
D:2 R:1 = Action Action2 INI

D:2 R:2 = Action Action2 END

D:3 R:2 = Action Action4 INI

00:02 +14: /Users/matthew/gadfly/forks/async_redux/test/sync_async_test.dart: 3) A sync reducer is called, which dispatches an ASYNC action.                           
D:2 R:2 = Action Action3C END

00:02 +14: /Users/matthew/gadfly/forks/async_redux/test/store_tester_test.dart: Dispatch a few actions and wait for all of them, in order. Gets an error because a different one was dispacthed in the middle.
D:3 R:3 = Action Action4 END

D:4 R:3 = Action Action3 INI

D:4 R:4 = Action Action3 END

00:02 +16: /Users/matthew/gadfly/forks/async_redux/test/sync_async_test.dart: 4) An ASYNC reducer is called, which dispatches another ASYNC action. The second reducer finishes BEFORE the first.
New StoreTester.
D:1 R:0 = Action Action4B INI

00:02 +16: /Users/matthew/gadfly/forks/async_redux/test/store_tester_test.dart: Dispatch a few actions and wait until one of them is dispatched, ignoring the others.Get the end state after this action.
New StoreTester.
D:1 R:0 = Action Action1 INI

D:1 R:1 = Action Action1 END

D:2 R:1 = Action Action2 INI

D:2 R:2 = Action Action2 END

D:3 R:2 = Action Action3 INI

D:3 R:3 = Action Action3 END

D:4 R:3 = Action Action4 INI

D:4 R:4 = Action Action4 END

00:02 +17: /Users/matthew/gadfly/forks/async_redux/test/store_tester_test.dart: Wait until some action that is never dispatched.Should timeout.                        
New StoreTester.
D:1 R:0 = Action Action1 INI

D:1 R:1 = Action Action1 END

D:2 R:1 = Action Action2 INI

D:2 R:2 = Action Action2 END

D:3 R:2 = Action Action4 INI

D:3 R:3 = Action Action4 END

00:02 +17: /Users/matthew/gadfly/forks/async_redux/test/sync_async_test.dart: 4) An ASYNC reducer is called, which dispatches another ASYNC action. The second reducer finishes BEFORE the first.
D:2 R:1 = Action Action4C INI

D:2 R:2 = Action Action4C END

D:2 R:2 = Action Action4B END

00:02 +18: /Users/matthew/gadfly/forks/async_redux/test/sync_async_test.dart: 5) An ASYNC reducer is called, which dispatches another ASYNC action. The second reducer finishes AFTER the first.
New StoreTester.
D:1 R:0 = Action Action5B INI

00:02 +21: /Users/matthew/gadfly/forks/async_redux/test/sync_async_test.dart: 5) An ASYNC reducer is called, which dispatches another ASYNC action. The second reducer finishes AFTER the first.
D:2 R:1 = Action Action5C INI

00:02 +27: /Users/matthew/gadfly/forks/async_redux/test/sync_async_test.dart: 5) An ASYNC reducer is called, which dispatches another ASYNC action. The second reducer finishes AFTER the first.
D:2 R:2 = Action Action5B END

00:02 +28: /Users/matthew/gadfly/forks/async_redux/test/model_observer_test.dart: ModelObserver.                                                                       
Model D:1 R:1 = Rebuid:true, Connector:_MyWidgetConnector, Model:_MyViewModel{B}.
Model D:2 R:2 = Rebuid:false, Connector:_MyWidgetConnector, Model:_MyViewModel{B}.
Model D:3 R:3 = Rebuid:true, Connector:_MyWidgetConnector, Model:_MyViewModel{C}.
Model D:4 R:4 = Rebuid:true, Connector:_MyWidgetConnector, Model:_MyViewModel{D}.
00:02 +29: /Users/matthew/gadfly/forks/async_redux/test/store_observer_test.dart: Dispatch a sync action, see what the StateObserver picks up.                         
New StoreTester.
D:1 R:0 = Action _MyAction INI

D:1 R:1 = Action _MyAction END

00:02 +30: /Users/matthew/gadfly/forks/async_redux/test/store_observer_test.dart: Dispatch an async action, see what the StateObserver picks up.                       
New StoreTester.
D:1 R:0 = Action _MyAsyncAction INI

D:1 R:1 = Action _MyAsyncAction END

00:02 +31: /Users/matthew/gadfly/forks/async_redux/test/sync_async_test.dart: 5) An ASYNC reducer is called, which dispatches another ASYNC action. The second reducer finishes AFTER the first.
D:2 R:2 = Action Action5C END

00:02 +32: /Users/matthew/gadfly/forks/async_redux/test/sync_async_test.dart: 6) This tests what happens if the developer makes a mistake and returns a COMPLETED Future: The reducer dispatches another ASYNC action. The second reducer finishes BEFORE the first, but its change of state is lost.
New StoreTester.
D:1 R:0 = Action Action6B INI

D:2 R:1 = Action Action6C INI

D:2 R:2 = Action Action6C END

D:2 R:2 = Action Action6B END

00:02 +33: /Users/matthew/gadfly/forks/async_redux/test/sync_async_test.dart: 7) Test 6 is fixed if the reducer executes an await (here we try putting it in the beggining).
New StoreTester.
D:1 R:0 = Action Action7B INI

D:2 R:1 = Action Action7C INI

D:2 R:2 = Action Action7B END

D:2 R:2 = Action Action7C END

00:02 +34: /Users/matthew/gadfly/forks/async_redux/test/sync_async_test.dart: 8) Test 6 is fixed if the reducer executes an await (here we try putting it in the end). 
New StoreTester.
D:1 R:0 = Action Action8B INI

D:2 R:1 = Action Action8C INI

D:2 R:2 = Action Action8C END

D:2 R:2 = Action Action8B END

00:02 +35: /Users/matthew/gadfly/forks/async_redux/test/sync_async_test.dart: 9) Test 6 is fixed if the reducer executes an await (here we try putting one in the beggining and one in the end).
New StoreTester.
D:1 R:0 = Action Action9B INI

D:2 R:1 = Action Action9C INI

D:2 R:2 = Action Action9C END

D:2 R:2 = Action Action9B END

00:02 +36: /Users/matthew/gadfly/forks/async_redux/test/persistence_test.dart: Create some simple state and persist, without throttle.                                 
New StoreTester.
D:1 R:0 = Action ChangeNameAction INI

D:1 R:1 = Action ChangeNameAction END

D:2 R:1 = Action ChangeNameAction INI

D:2 R:2 = Action ChangeNameAction END

00:02 +37: /Users/matthew/gadfly/forks/async_redux/test/persistence_test.dart: Create some simple state and persist, with a 1 second throttle.                         
New StoreTester.
D:1 R:0 = Action ChangeNameAction INI

D:1 R:1 = Action ChangeNameAction END

D:2 R:1 = Action ChangeNameAction INI

D:2 R:2 = Action ChangeNameAction END

D:3 R:2 = Action ChangeNameAction INI

D:3 R:3 = Action ChangeNameAction END

00:03 +38 -1: /Users/matthew/gadfly/forks/async_redux/test/local_persist_test.dart: Save and load state. [E]                                                           
  ServicesBinding.defaultBinaryMessenger was accessed before the binding was initialized.
  If you're running an application and need to access the binary messenger before `runApp()` has been called (for example, during plugin initialization), then you need to explicitly call the `WidgetsFlutterBinding.ensureInitialized()` first.
  If you're running a test, you can call the `TestWidgetsFlutterBinding.ensureInitialized()` as the first line in your test's `main()` method to initialize the binding.
  package:flutter/src/services/binary_messenger.dart 76:7    defaultBinaryMessenger.<fn>
  package:flutter/src/services/binary_messenger.dart 89:4    defaultBinaryMessenger
  package:flutter/src/services/platform_channel.dart 140:62  MethodChannel.binaryMessenger
  package:flutter/src/services/platform_channel.dart 146:35  MethodChannel._invokeMethod
  package:flutter/src/services/platform_channel.dart 329:12  MethodChannel.invokeMethod
  package:path_provider/path_provider.dart 92:22             getApplicationDocumentsDirectory
  package:async_redux/src/local_persist.dart 199:28          LocalPersist._findAppDocDir
  package:async_redux/src/local_persist.dart 175:37          LocalPersist.file
  package:async_redux/src/local_persist.dart 79:42           LocalPersist.save
  local_persist_test.dart 64:19                              main.<fn>

00:03 +38 -2: /Users/matthew/gadfly/forks/async_redux/test/local_persist_test.dart: Test file can be defined by String or enum. [E]                                    
  ServicesBinding.defaultBinaryMessenger was accessed before the binding was initialized.
  If you're running an application and need to access the binary messenger before `runApp()` has been called (for example, during plugin initialization), then you need to explicitly call the `WidgetsFlutterBinding.ensureInitialized()` first.
  If you're running a test, you can call the `TestWidgetsFlutterBinding.ensureInitialized()` as the first line in your test's `main()` method to initialize the binding.
  package:flutter/src/services/binary_messenger.dart 76:7    defaultBinaryMessenger.<fn>
  package:flutter/src/services/binary_messenger.dart 89:4    defaultBinaryMessenger
  package:flutter/src/services/platform_channel.dart 140:62  MethodChannel.binaryMessenger
  package:flutter/src/services/platform_channel.dart 146:35  MethodChannel._invokeMethod
  package:flutter/src/services/platform_channel.dart 329:12  MethodChannel.invokeMethod
  package:path_provider/path_provider.dart 92:22             getApplicationDocumentsDirectory
  package:async_redux/src/local_persist.dart 199:28          LocalPersist._findAppDocDir
  package:async_redux/src/local_persist.dart 175:37          LocalPersist.file
  local_persist_test.dart 86:43                              main.<fn>

00:03 +38 -3: /Users/matthew/gadfly/forks/async_redux/test/local_persist_test.dart: Add objects to save, and load from file name. [E]                                  
  ServicesBinding.defaultBinaryMessenger was accessed before the binding was initialized.
  If you're running an application and need to access the binary messenger before `runApp()` has been called (for example, during plugin initialization), then you need to explicitly call the `WidgetsFlutterBinding.ensureInitialized()` first.
  If you're running a test, you can call the `TestWidgetsFlutterBinding.ensureInitialized()` as the first line in your test's `main()` method to initialize the binding.
  package:flutter/src/services/binary_messenger.dart 76:7    defaultBinaryMessenger.<fn>
  package:flutter/src/services/binary_messenger.dart 89:4    defaultBinaryMessenger
  package:flutter/src/services/platform_channel.dart 140:62  MethodChannel.binaryMessenger
  package:flutter/src/services/platform_channel.dart 146:35  MethodChannel._invokeMethod
  package:flutter/src/services/platform_channel.dart 329:12  MethodChannel.invokeMethod
  package:path_provider/path_provider.dart 92:22             getApplicationDocumentsDirectory
  package:async_redux/src/local_persist.dart 199:28          LocalPersist._findAppDocDir
  package:async_redux/src/local_persist.dart 175:37          LocalPersist.file
  package:async_redux/src/local_persist.dart 79:42           LocalPersist.save
  local_persist_test.dart 107:19                             main.<fn>

00:03 +38 -4: /Users/matthew/gadfly/forks/async_redux/test/local_persist_test.dart: Test appending, then loading. [E]                                                  
  ServicesBinding.defaultBinaryMessenger was accessed before the binding was initialized.
  If you're running an application and need to access the binary messenger before `runApp()` has been called (for example, during plugin initialization), then you need to explicitly call the `WidgetsFlutterBinding.ensureInitialized()` first.
  If you're running a test, you can call the `TestWidgetsFlutterBinding.ensureInitialized()` as the first line in your test's `main()` method to initialize the binding.
  package:flutter/src/services/binary_messenger.dart 76:7    defaultBinaryMessenger.<fn>
  package:flutter/src/services/binary_messenger.dart 89:4    defaultBinaryMessenger
  package:flutter/src/services/platform_channel.dart 140:62  MethodChannel.binaryMessenger
  package:flutter/src/services/platform_channel.dart 146:35  MethodChannel._invokeMethod
  package:flutter/src/services/platform_channel.dart 329:12  MethodChannel.invokeMethod
  package:path_provider/path_provider.dart 92:22             getApplicationDocumentsDirectory
  package:async_redux/src/local_persist.dart 199:28          LocalPersist._findAppDocDir
  package:async_redux/src/local_persist.dart 175:37          LocalPersist.file
  package:async_redux/src/local_persist.dart 79:42           LocalPersist.save
  local_persist_test.dart 134:19                             main.<fn>

00:03 +38 -5: /Users/matthew/gadfly/forks/async_redux/test/local_persist_test.dart: Test create, append, overwrite and delete the file. [E]                            
  ServicesBinding.defaultBinaryMessenger was accessed before the binding was initialized.
  If you're running an application and need to access the binary messenger before `runApp()` has been called (for example, during plugin initialization), then you need to explicitly call the `WidgetsFlutterBinding.ensureInitialized()` first.
  If you're running a test, you can call the `TestWidgetsFlutterBinding.ensureInitialized()` as the first line in your test's `main()` method to initialize the binding.
  package:flutter/src/services/binary_messenger.dart 76:7    defaultBinaryMessenger.<fn>
  package:flutter/src/services/binary_messenger.dart 89:4    defaultBinaryMessenger
  package:flutter/src/services/platform_channel.dart 140:62  MethodChannel.binaryMessenger
  package:flutter/src/services/platform_channel.dart 146:35  MethodChannel._invokeMethod
  package:flutter/src/services/platform_channel.dart 329:12  MethodChannel.invokeMethod
  package:path_provider/path_provider.dart 92:22             getApplicationDocumentsDirectory
  package:async_redux/src/local_persist.dart 199:28          LocalPersist._findAppDocDir
  package:async_redux/src/local_persist.dart 175:37          LocalPersist.file
  package:async_redux/src/local_persist.dart 79:42           LocalPersist.save
  local_persist_test.dart 183:19                             main.<fn>

00:03 +38 -6: /Users/matthew/gadfly/forks/async_redux/test/local_persist_test.dart: Load/Length/Exists file that doesn't exist, or exists and is empty. [E]            
  ServicesBinding.defaultBinaryMessenger was accessed before the binding was initialized.
  If you're running an application and need to access the binary messenger before `runApp()` has been called (for example, during plugin initialization), then you need to explicitly call the `WidgetsFlutterBinding.ensureInitialized()` first.
  If you're running a test, you can call the `TestWidgetsFlutterBinding.ensureInitialized()` as the first line in your test's `main()` method to initialize the binding.
  package:flutter/src/services/binary_messenger.dart 76:7    defaultBinaryMessenger.<fn>
  package:flutter/src/services/binary_messenger.dart 89:4    defaultBinaryMessenger
  package:flutter/src/services/platform_channel.dart 140:62  MethodChannel.binaryMessenger
  package:flutter/src/services/platform_channel.dart 146:35  MethodChannel._invokeMethod
  package:flutter/src/services/platform_channel.dart 329:12  MethodChannel.invokeMethod
  package:path_provider/path_provider.dart 92:22             getApplicationDocumentsDirectory
  package:async_redux/src/local_persist.dart 199:28          LocalPersist._findAppDocDir
  package:async_redux/src/local_persist.dart 175:37          LocalPersist.file
  package:async_redux/src/local_persist.dart 95:42           LocalPersist.load
  local_persist_test.dart 210:26                             main.<fn>

00:03 +38 -7: /Users/matthew/gadfly/forks/async_redux/test/local_persist_test.dart: Deletes a file that exists or doesn't exist. [E]                                   
  ServicesBinding.defaultBinaryMessenger was accessed before the binding was initialized.
  If you're running an application and need to access the binary messenger before `runApp()` has been called (for example, during plugin initialization), then you need to explicitly call the `WidgetsFlutterBinding.ensureInitialized()` first.
  If you're running a test, you can call the `TestWidgetsFlutterBinding.ensureInitialized()` as the first line in your test's `main()` method to initialize the binding.
  package:flutter/src/services/binary_messenger.dart 76:7    defaultBinaryMessenger.<fn>
  package:flutter/src/services/binary_messenger.dart 89:4    defaultBinaryMessenger
  package:flutter/src/services/platform_channel.dart 140:62  MethodChannel.binaryMessenger
  package:flutter/src/services/platform_channel.dart 146:35  MethodChannel._invokeMethod
  package:flutter/src/services/platform_channel.dart 329:12  MethodChannel.invokeMethod
  package:path_provider/path_provider.dart 92:22             getApplicationDocumentsDirectory
  package:async_redux/src/local_persist.dart 199:28          LocalPersist._findAppDocDir
  package:async_redux/src/local_persist.dart 175:37          LocalPersist.file
  package:async_redux/src/local_persist.dart 130:42          LocalPersist.delete
  local_persist_test.dart 228:26                             main.<fn>

00:03 +38 -8: /Users/matthew/gadfly/forks/async_redux/test/local_persist_test.dart: Load as object. [E]                                                                
  ServicesBinding.defaultBinaryMessenger was accessed before the binding was initialized.
  If you're running an application and need to access the binary messenger before `runApp()` has been called (for example, during plugin initialization), then you need to explicitly call the `WidgetsFlutterBinding.ensureInitialized()` first.
  If you're running a test, you can call the `TestWidgetsFlutterBinding.ensureInitialized()` as the first line in your test's `main()` method to initialize the binding.
  package:flutter/src/services/binary_messenger.dart 76:7    defaultBinaryMessenger.<fn>
  package:flutter/src/services/binary_messenger.dart 89:4    defaultBinaryMessenger
  package:flutter/src/services/platform_channel.dart 140:62  MethodChannel.binaryMessenger
  package:flutter/src/services/platform_channel.dart 146:35  MethodChannel._invokeMethod
  package:flutter/src/services/platform_channel.dart 329:12  MethodChannel.invokeMethod
  package:path_provider/path_provider.dart 92:22             getApplicationDocumentsDirectory
  package:async_redux/src/local_persist.dart 199:28          LocalPersist._findAppDocDir
  package:async_redux/src/local_persist.dart 175:37          LocalPersist.file
  package:async_redux/src/local_persist.dart 79:42           LocalPersist.save
  local_persist_test.dart 251:19                             main.<fn>

00:03 +38 -9: /Users/matthew/gadfly/forks/async_redux/test/local_persist_test.dart: Load many object as single object. [E]                                             
  ServicesBinding.defaultBinaryMessenger was accessed before the binding was initialized.
  If you're running an application and need to access the binary messenger before `runApp()` has been called (for example, during plugin initialization), then you need to explicitly call the `WidgetsFlutterBinding.ensureInitialized()` first.
  If you're running a test, you can call the `TestWidgetsFlutterBinding.ensureInitialized()` as the first line in your test's `main()` method to initialize the binding.
  package:flutter/src/services/binary_messenger.dart 76:7    defaultBinaryMessenger.<fn>
  package:flutter/src/services/binary_messenger.dart 89:4    defaultBinaryMessenger
  package:flutter/src/services/platform_channel.dart 140:62  MethodChannel.binaryMessenger
  package:flutter/src/services/platform_channel.dart 146:35  MethodChannel._invokeMethod
  package:flutter/src/services/platform_channel.dart 329:12  MethodChannel.invokeMethod
  package:path_provider/path_provider.dart 92:22             getApplicationDocumentsDirectory
  package:async_redux/src/local_persist.dart 199:28          LocalPersist._findAppDocDir
  package:async_redux/src/local_persist.dart 175:37          LocalPersist.file
  package:async_redux/src/local_persist.dart 79:42           LocalPersist.save
  local_persist_test.dart 277:19                             main.<fn>

00:03 +39 -10: /Users/matthew/gadfly/forks/async_redux/test/local_persist_test.dart: Load as object (map) something which is not an object. [E]                        
  ServicesBinding.defaultBinaryMessenger was accessed before the binding was initialized.
  If you're running an application and need to access the binary messenger before `runApp()` has been called (for example, during plugin initialization), then you need to explicitly call the `WidgetsFlutterBinding.ensureInitialized()` first.
  If you're running a test, you can call the `TestWidgetsFlutterBinding.ensureInitialized()` as the first line in your test's `main()` method to initialize the binding.
  package:flutter/src/services/binary_messenger.dart 76:7    defaultBinaryMessenger.<fn>
  package:flutter/src/services/binary_messenger.dart 89:4    defaultBinaryMessenger
  package:flutter/src/services/platform_channel.dart 140:62  MethodChannel.binaryMessenger
  package:flutter/src/services/platform_channel.dart 146:35  MethodChannel._invokeMethod
  package:flutter/src/services/platform_channel.dart 329:12  MethodChannel.invokeMethod
  package:path_provider/path_provider.dart 92:22             getApplicationDocumentsDirectory
  package:async_redux/src/local_persist.dart 199:28          LocalPersist._findAppDocDir
  package:async_redux/src/local_persist.dart 175:37          LocalPersist.file
  package:async_redux/src/local_persist.dart 79:42           LocalPersist.save
  local_persist_test.dart 298:19                             main.<fn>

00:03 +40 -10: /Users/matthew/gadfly/forks/async_redux/test/store_tester_test.dart: Dispatch a few actions and wait until one specific action instance is dispatched, ignoring the others.Get the end state after this action.
New StoreTester.
D:1 R:0 = Action Action1 INI

D:1 R:1 = Action Action1 END

D:2 R:1 = Action Action2 INI

D:2 R:2 = Action Action2 END

D:3 R:2 = Action Action3 INI

D:3 R:3 = Action Action3 END

D:4 R:3 = Action Action4 INI

D:4 R:4 = Action Action4 END

00:03 +41 -10: /Users/matthew/gadfly/forks/async_redux/test/store_tester_test.dart: Wait until some action that is never dispatched.Should timeout.                    
New StoreTester.
D:1 R:0 = Action Action1 INI

D:1 R:1 = Action Action1 END

D:2 R:1 = Action Action2 INI

D:2 R:2 = Action Action2 END

D:3 R:2 = Action Action4 INI

D:3 R:3 = Action Action4 END

00:04 +47 -10: /Users/matthew/gadfly/forks/async_redux/test/store_tester_test.dart: Dispatch a few actions and wait for all of them, in ANY order. Get the end state.  
New StoreTester.
D:1 R:0 = Action Action1 INI

D:1 R:1 = Action Action1 END

D:2 R:1 = Action Action2 INI

D:2 R:2 = Action Action2 END

D:3 R:2 = Action Action3 INI

D:3 R:3 = Action Action3 END

00:04 +48 -10: /Users/matthew/gadfly/forks/async_redux/test/store_tester_test.dart: Dispatch a few actions and wait for all of them, in ANY order. Gets an error because there is a different one in the middle.
New StoreTester.
D:1 R:0 = Action Action1 INI

D:1 R:1 = Action Action1 END

D:2 R:1 = Action Action2 INI

D:2 R:2 = Action Action2 END

D:3 R:2 = Action Action4 INI

D:3 R:3 = Action Action4 END

D:4 R:3 = Action Action3 INI

D:4 R:4 = Action Action3 END

00:04 +49 -10: /Users/matthew/gadfly/forks/async_redux/test/store_tester_test.dart: Dispatch a few actions and wait for all of them, in order. Get all of the intermediary states.
New StoreTester.
D:1 R:0 = Action Action1 INI

D:1 R:1 = Action Action1 END

D:2 R:1 = Action Action2 INI

D:2 R:2 = Action Action2 END

D:3 R:2 = Action Action3 INI

D:3 R:3 = Action Action3 END

00:04 +50 -10: /Users/matthew/gadfly/forks/async_redux/test/store_tester_test.dart: Dispatch a few actions and wait for all of them, in ANY order. Get all of the intermediary states.
New StoreTester.
D:1 R:0 = Action Action1 INI

D:1 R:1 = Action Action1 END

D:2 R:1 = Action Action2 INI

D:2 R:2 = Action Action2 END

D:3 R:2 = Action Action2 INI

D:3 R:3 = Action Action2 END

D:4 R:3 = Action Action3 INI

D:4 R:4 = Action Action3 END

00:04 +51 -10: /Users/matthew/gadfly/forks/async_redux/test/store_tester_test.dart: Dispatch a few actions and wait for all of them, in ANY order. Ignore some actions. Get all of the intermediary states.
New StoreTester.
D:1 R:0 = Action Action1 INI

D:1 R:1 = Action Action1 END

D:2 R:1 = Action Action2 INI

D:2 R:2 = Action Action2 END

D:3 R:2 = Action Action2 INI

D:3 R:3 = Action Action2 END

D:4 R:3 = Action Action3 INI

D:4 R:4 = Action Action3 END

00:04 +52 -10: /Users/matthew/gadfly/forks/async_redux/test/store_tester_test.dart: Dispatch a few actions and wait for all of them, in order. Ignore some actions. Get the end state.
New StoreTester.
D:1 R:0 = Action Action4 INI

D:1 R:1 = Action Action4 END

D:2 R:1 = Action Action1 INI

D:2 R:2 = Action Action1 END

D:3 R:2 = Action Action2 INI

D:3 R:3 = Action Action2 END

D:4 R:3 = Action Action2 INI

D:4 R:4 = Action Action2 END

D:5 R:4 = Action Action3 INI

D:5 R:5 = Action Action3 END

D:6 R:5 = Action Action4 INI

D:6 R:6 = Action Action4 END

D:7 R:6 = Action Action2 INI

D:7 R:7 = Action Action2 END

D:8 R:7 = Action Action4 INI

D:8 R:8 = Action Action4 END

D:9 R:8 = Action Action5 INI

D:9 R:9 = Action Action5 END

D:10 R:9 = Action Action4 INI

D:10 R:10 = Action Action4 END

00:04 +53 -10: /Users/matthew/gadfly/forks/async_redux/test/store_tester_test.dart: Dispatch a few actions and wait for all of them, in order. Ignore some actions. Get all of the intermediary states.
New StoreTester.
D:1 R:0 = Action Action4 INI

D:1 R:1 = Action Action4 END

D:2 R:1 = Action Action1 INI

D:2 R:2 = Action Action1 END

D:3 R:2 = Action Action2 INI

D:3 R:3 = Action Action2 END

D:4 R:3 = Action Action2 INI

D:4 R:4 = Action Action2 END

D:5 R:4 = Action Action3 INI

D:5 R:5 = Action Action3 END

D:6 R:5 = Action Action4 INI

D:6 R:6 = Action Action4 END

D:7 R:6 = Action Action2 INI

D:7 R:7 = Action Action2 END

D:8 R:7 = Action Action4 INI

D:8 R:8 = Action Action4 END

D:9 R:8 = Action Action5 INI

D:9 R:9 = Action Action5 END

D:10 R:9 = Action Action4 INI

D:10 R:10 = Action Action4 END

00:04 +54 -10: /Users/matthew/gadfly/forks/async_redux/test/store_tester_test.dart: Dispatch a few actions and wait for all of them, in order. Ignore some actions, including one which we are also waiting for it. Get all of the intermediary states.
New StoreTester.
D:1 R:0 = Action Action1 INI

D:1 R:1 = Action Action1 END

D:2 R:1 = Action Action2 INI

D:2 R:2 = Action Action2 END

D:3 R:2 = Action Action3 INI

D:3 R:3 = Action Action3 END

00:04 +55 -10: /Users/matthew/gadfly/forks/async_redux/test/store_tester_test.dart: Dispatch a few actions and wait for all of them, in order. Ignore some actions, including one which we are also waiting for it. Get all of the intermediary states.
New StoreTester.
D:1 R:0 = Action Action4 INI

D:1 R:1 = Action Action4 END

D:2 R:1 = Action Action1 INI

D:2 R:2 = Action Action1 END

D:3 R:2 = Action Action2 INI

D:3 R:3 = Action Action2 END

D:4 R:3 = Action Action2 INI

D:4 R:4 = Action Action2 END

D:5 R:4 = Action Action3 INI

D:5 R:5 = Action Action3 END

D:6 R:5 = Action Action4 INI

D:6 R:6 = Action Action4 END

D:7 R:6 = Action Action2 INI

D:7 R:7 = Action Action2 END

D:8 R:7 = Action Action4 INI

D:8 R:8 = Action Action4 END

D:9 R:8 = Action Action5 INI

D:9 R:9 = Action Action5 END

D:10 R:9 = Action Action4 INI

D:10 R:10 = Action Action4 END

00:04 +56 -10: /Users/matthew/gadfly/forks/async_redux/test/store_tester_test.dart: Dispatch a few actions, some async that dispatch others, and wait for all of them, in order. Ignore some actions, including one which we are also waiting for it. Get all of the intermediary states.
New StoreTester.
D:1 R:0 = Action Action6 INI

D:2 R:1 = Action Action1 INI

D:2 R:2 = Action Action1 END

D:3 R:2 = Action Action2 INI

D:3 R:3 = Action Action2 END

D:4 R:3 = Action Action3 INI

D:4 R:4 = Action Action3 END

D:4 R:4 = Action Action6 END

00:04 +57 -10: /Users/matthew/gadfly/forks/async_redux/test/store_tester_test.dart: Dispatch a more complex action sequence. Get all of the intermediary states.       
New StoreTester.
D:1 R:0 = Action Action7 INI

D:2 R:1 = Action Action4 INI

D:2 R:2 = Action Action4 END

D:3 R:2 = Action Action6 INI

D:4 R:3 = Action Action1 INI

D:4 R:4 = Action Action1 END

D:5 R:4 = Action Action2 INI

D:5 R:5 = Action Action2 END

D:6 R:5 = Action Action3 INI

D:6 R:6 = Action Action3 END

D:6 R:6 = Action Action6 END

D:7 R:6 = Action Action2 INI

D:7 R:7 = Action Action2 END

D:8 R:7 = Action Action5 INI

D:8 R:8 = Action Action5 END

D:8 R:8 = Action Action7 END

00:04 +58 -10: /Users/matthew/gadfly/forks/async_redux/test/store_tester_test.dart: Dispatch a more complex action sequence. One of the actions contains "await". Get all of the intermediary states.
New StoreTester.
D:1 R:0 = Action Action7b INI

D:2 R:1 = Action Action4 INI

D:2 R:2 = Action Action4 END

D:3 R:2 = Action Action6b INI

D:4 R:3 = Action Action1 INI

D:4 R:4 = Action Action1 END

D:5 R:4 = Action Action2 INI

D:5 R:5 = Action Action2 END

D:6 R:5 = Action Action5 INI

D:6 R:6 = Action Action5 END

D:6 R:6 = Action Action7b END

D:7 R:6 = Action Action2 INI

D:7 R:7 = Action Action2 END

D:8 R:7 = Action Action3 INI

D:8 R:8 = Action Action3 END

D:8 R:8 = Action Action6b END

00:04 +59 -10: /Users/matthew/gadfly/forks/async_redux/test/store_tester_test.dart: Dispatch a more complex actions sequence. One of the actions contains "await". Ignore an action. Get all of the intermediary states.
New StoreTester.
D:1 R:0 = Action Action7b INI

D:2 R:1 = Action Action4 INI

D:2 R:2 = Action Action4 END

D:3 R:2 = Action Action6b INI

D:4 R:3 = Action Action1 INI

D:4 R:4 = Action Action1 END

D:5 R:4 = Action Action2 INI

D:5 R:5 = Action Action2 END

D:6 R:5 = Action Action5 INI

D:6 R:6 = Action Action5 END

D:6 R:6 = Action Action7b END

00:04 +60 -10: /Users/matthew/gadfly/forks/async_redux/test/persistence_test.dart: There is no throttle. The state is changed each 40 milliseconds. Here we test that the initial state is persisted, and then that the state and the persistence change together.
New StoreTester.
00:04 +60 -10: /Users/matthew/gadfly/forks/async_redux/test/store_tester_test.dart: Dispatch a more complex actions sequence. One of the actions contains "await". Ignore an action. Get all of the intermediary states.
D:7 R:6 = Action Action2 INI

D:7 R:7 = Action Action2 END

D:8 R:7 = Action Action3 INI

D:8 R:8 = Action Action3 END

D:8 R:8 = Action Action6b END

00:04 +61 -10: /Users/matthew/gadfly/forks/async_redux/test/store_tester_test.dart: Dispatch a more complex actions sequence. An ignored action will finish after all others have started. Get all of the intermediary states.
New StoreTester.
D:1 R:0 = Action Action8 INI

D:2 R:1 = Action Action9 INI

00:04 +61 -10: /Users/matthew/gadfly/forks/async_redux/test/persistence_test.dart: There is no throttle. The state is changed each 40 milliseconds. Here we test that the initial state is persisted, and then that the state and the persistence change together.
D:1 R:0 = Action ChangeNameAction INI

D:1 R:1 = Action ChangeNameAction END

00:04 +61 -10: /Users/matthew/gadfly/forks/async_redux/test/store_tester_test.dart: Dispatch a more complex actions sequence. An ignored action will finish after all others have started. Get all of the intermediary states.
D:3 R:2 = Action Action2 INI

D:3 R:3 = Action Action2 END

D:3 R:3 = Action Action8 END

00:04 +61 -10: /Users/matthew/gadfly/forks/async_redux/test/persistence_test.dart: There is no throttle. The state is changed each 40 milliseconds. Here we test that the initial state is persisted, and then that the state and the persistence change together.
D:2 R:1 = Action ChangeNameAction INI

D:2 R:2 = Action ChangeNameAction END

00:04 +61 -10: /Users/matthew/gadfly/forks/async_redux/test/store_tester_test.dart: Dispatch a more complex actions sequence. An ignored action will finish after all others have started. Get all of the intermediary states.
D:3 R:3 = Action Action9 END

00:04 +62 -10: /Users/matthew/gadfly/forks/async_redux/test/store_tester_test.dart: An ignored action starts after the last expected actions starts, but before this last expected action finishes.
New StoreTester.
D:1 R:0 = Action Action9 INI

D:2 R:1 = Action Action1 INI

D:2 R:2 = Action Action1 END

D:3 R:2 = Action Action9 INI

D:4 R:3 = Action Action1 INI

D:4 R:4 = Action Action1 END

00:04 +62 -10: /Users/matthew/gadfly/forks/async_redux/test/persistence_test.dart: There is no throttle. The state is changed each 40 milliseconds. Here we test that the initial state is persisted, and then that the state and the persistence change together.
D:3 R:2 = Action ChangeNameAction INI

D:3 R:3 = Action ChangeNameAction END

D:4 R:3 = Action ChangeNameAction INI

D:4 R:4 = Action ChangeNameAction END

D:5 R:4 = Action ChangeNameAction INI

D:5 R:5 = Action ChangeNameAction END

00:04 +62 -10: /Users/matthew/gadfly/forks/async_redux/test/store_tester_test.dart: An ignored action starts after the last expected actions starts, but before this last expected action finishes.
D:4 R:4 = Action Action9 END

D:4 R:4 = Action Action9 END

00:04 +63 -10: /Users/matthew/gadfly/forks/async_redux/test/store_tester_test.dart: Makes sure we wait until the END of all ignored actions.                           
New StoreTester.
D:1 R:0 = Action Action6 INI

D:2 R:1 = Action Action1 INI

D:2 R:2 = Action Action1 END

D:3 R:2 = Action Action2 INI

D:3 R:3 = Action Action2 END

D:4 R:3 = Action Action3 INI

D:4 R:4 = Action Action3 END

D:4 R:4 = Action Action6 END

00:04 +64 -10: /Users/matthew/gadfly/forks/async_redux/test/persistence_test.dart: There is no throttle. The state is changed each 40 milliseconds. Here we test that the initial state is persisted, and then that the state and the persistence change together.
D:6 R:5 = Action ChangeNameAction INI

D:6 R:6 = Action ChangeNameAction END

00:04 +64 -10: /Users/matthew/gadfly/forks/async_redux/test/store_tester_test.dart: Makes sure we wait until the END of all ignored actions.                           
New StoreTester.
D:1 R:0 = Action Action6 INI

D:2 R:1 = Action Action1 INI

D:2 R:2 = Action Action1 END

D:3 R:2 = Action Action2 INI

D:3 R:3 = Action Action2 END

D:4 R:3 = Action Action3 INI

D:4 R:4 = Action Action3 END

D:4 R:4 = Action Action6 END

D:5 R:4 = Action Action6 INI

D:6 R:5 = Action Action1 INI

D:6 R:6 = Action Action1 END

D:7 R:6 = Action Action2 INI

D:7 R:7 = Action Action2 END

D:8 R:7 = Action Action3 INI

D:8 R:8 = Action Action3 END

D:8 R:8 = Action Action6 END

00:04 +65 -10: /Users/matthew/gadfly/forks/async_redux/test/store_tester_test.dart: Makes sure we wait until the END of all ignored actions.                           
New StoreTester.
D:1 R:0 = Action Action6 INI

D:2 R:1 = Action Action1 INI

D:2 R:2 = Action Action1 END

D:3 R:2 = Action Action2 INI

D:3 R:3 = Action Action2 END

D:4 R:3 = Action Action3 INI

D:4 R:4 = Action Action3 END

D:4 R:4 = Action Action6 END

D:5 R:4 = Action Action6 INI

D:6 R:5 = Action Action1 INI

D:6 R:6 = Action Action1 END

D:7 R:6 = Action Action2 INI

D:7 R:7 = Action Action2 END

D:8 R:7 = Action Action3 INI

D:8 R:8 = Action Action3 END

D:8 R:8 = Action Action6 END

00:04 +66 -10: /Users/matthew/gadfly/forks/async_redux/test/store_tester_test.dart: Makes sure we wait until the END of all ignored actions.                           
New StoreTester.
D:1 R:0 = Action Action6 INI

D:2 R:1 = Action Action1 INI

D:2 R:2 = Action Action1 END

D:3 R:2 = Action Action2 INI

D:3 R:3 = Action Action2 END

D:4 R:3 = Action Action3 INI

D:4 R:4 = Action Action3 END

D:4 R:4 = Action Action6 END

D:5 R:4 = Action Action4 INI

D:5 R:5 = Action Action4 END

00:04 +67 -10: /Users/matthew/gadfly/forks/async_redux/test/store_tester_test.dart: Makes sure we wait until the END of all ignored actions.                           
New StoreTester.
D:1 R:0 = Action Action6c INI

D:2 R:1 = Action Action1 INI

D:2 R:2 = Action Action1 END

D:3 R:2 = Action Action2 INI

D:3 R:3 = Action Action2 END

D:4 R:3 = Action Action3b INI

D:5 R:4 = Action Action4 INI

D:5 R:5 = Action Action4 END

D:5 R:5 = Action Action3b END

D:5 R:5 = Action Action6c END

00:04 +68 -10: /Users/matthew/gadfly/forks/async_redux/test/store_tester_test.dart: Error message when time is out.                                                    
New StoreTester.
00:04 +68 -10: /Users/matthew/gadfly/forks/async_redux/test/persistence_test.dart: There is no throttle. The state is changed each 40 milliseconds. Here we test that the initial state is persisted, and then that the state and the persistence change together.
D:7 R:6 = Action ChangeNameAction INI

D:7 R:7 = Action ChangeNameAction END

D:8 R:7 = Action ChangeNameAction INI

D:8 R:8 = Action ChangeNameAction END

-
RESULTS:
(state:John, db: John)
(state:0, db: 0)
(state:1, db: 1)
(state:2, db: 2)
(state:3, db: 3)
(state:4, db: 4)
(state:5, db: 5)
(state:6, db: 6)
(state:7, db: 7)
-
00:04 +69 -10: /Users/matthew/gadfly/forks/async_redux/test/persistence_test.dart: The throttle period is 215 milliseconds. The state is changed each 60 milliseconds. Here we test that the initial state is persisted, and then that the state and the persistence occur when they should.
New StoreTester.
D:1 R:0 = Action ChangeNameAction INI

D:1 R:1 = Action ChangeNameAction END

D:2 R:1 = Action ChangeNameAction INI

D:2 R:2 = Action ChangeNameAction END

D:3 R:2 = Action ChangeNameAction INI

D:3 R:3 = Action ChangeNameAction END

D:4 R:3 = Action ChangeNameAction INI

D:4 R:4 = Action ChangeNameAction END

D:5 R:4 = Action ChangeNameAction INI

D:5 R:5 = Action ChangeNameAction END

D:6 R:5 = Action ChangeNameAction INI

D:6 R:6 = Action ChangeNameAction END

D:7 R:6 = Action ChangeNameAction INI

D:7 R:7 = Action ChangeNameAction END

D:8 R:7 = Action ChangeNameAction INI

D:8 R:8 = Action ChangeNameAction END

D:9 R:8 = Action ChangeNameAction INI

D:9 R:9 = Action ChangeNameAction END

D:10 R:9 = Action ChangeNameAction INI

D:10 R:10 = Action ChangeNameAction END

D:11 R:10 = Action ChangeNameAction INI

D:11 R:11 = Action ChangeNameAction END

D:12 R:11 = Action ChangeNameAction INI

D:12 R:12 = Action ChangeNameAction END

D:13 R:12 = Action ChangeNameAction INI

D:13 R:13 = Action ChangeNameAction END

D:14 R:13 = Action ChangeNameAction INI

D:14 R:14 = Action ChangeNameAction END

D:15 R:14 = Action ChangeNameAction INI

D:15 R:15 = Action ChangeNameAction END

-
RESULTS:
(state:John, db: John)
(state:0, db: John)
(state:1, db: John)
(state:2, db: John)
(state:3, db: 2)
(state:4, db: 2)
(state:5, db: 2)
(state:6, db: 2)
(state:7, db: 6)
(state:8, db: 6)
(state:9, db: 6)
(state:10, db: 9)
(state:11, db: 9)
(state:12, db: 9)
(state:13, db: 9)
(state:14, db: 13)
-
00:05 +71 -10: /Users/matthew/gadfly/forks/async_redux/test/store_tester_test.dart: An action dispatches other actions, and one of them throws an error. Wait until that action finishes, and check the error.
New StoreTester.
D:1 R:0 = Action Action10 INI

D:2 R:1 = Action Action1 INI

D:2 R:2 = Action Action1 END

D:3 R:2 = Action Action2 INI

D:3 R:3 = Action Action2 END

D:4 R:3 = Action Action11 INI

D:5 R:4 = Action Action3 INI

D:5 R:5 = Action Action3 END

D:5 R:5 = Action Action11 END

D:5 R:5 = Action Action10 END

00:05 +72 -10: /Users/matthew/gadfly/forks/async_redux/test/store_tester_test.dart: An action dispatches other actions, and one of them throws an error. Wait until the error TYPE is thrown, and check the error.
New StoreTester.
D:1 R:0 = Action Action10 INI

D:2 R:1 = Action Action1 INI

D:2 R:2 = Action Action1 END

D:3 R:2 = Action Action2 INI

D:3 R:3 = Action Action2 END

D:4 R:3 = Action Action11 INI

D:5 R:4 = Action Action3 INI

D:5 R:5 = Action Action3 END

D:5 R:5 = Action Action11 END

D:5 R:5 = Action Action10 END

00:05 +73 -10: /Users/matthew/gadfly/forks/async_redux/test/store_tester_test.dart: An action dispatches other actions, and one of them throws an error. Wait until the error (compare using equals) is thrown, and check the error.
New StoreTester.
D:1 R:0 = Action Action10 INI

D:2 R:1 = Action Action1 INI

D:2 R:2 = Action Action1 END

D:3 R:2 = Action Action2 INI

D:3 R:3 = Action Action2 END

D:4 R:3 = Action Action11 INI

D:5 R:4 = Action Action3 INI

D:5 R:5 = Action Action3 END

D:5 R:5 = Action Action11 END

D:5 R:5 = Action Action10 END

00:05 +74 -10: /Users/matthew/gadfly/forks/async_redux/test/persistence_test.dart: There is no throttle. Each save takes 215 milliseconds. The state is changed each 60 milliseconds. Here we test that the initial state is persisted, and then that the state and the persistence occur when they should.
New StoreTester.
D:1 R:0 = Action ChangeNameAction INI

D:1 R:1 = Action ChangeNameAction END

D:2 R:1 = Action ChangeNameAction INI

D:2 R:2 = Action ChangeNameAction END

D:3 R:2 = Action ChangeNameAction INI

D:3 R:3 = Action ChangeNameAction END

D:4 R:3 = Action ChangeNameAction INI

D:4 R:4 = Action ChangeNameAction END

D:5 R:4 = Action ChangeNameAction INI

D:5 R:5 = Action ChangeNameAction END

D:6 R:5 = Action ChangeNameAction INI

D:6 R:6 = Action ChangeNameAction END

D:7 R:6 = Action ChangeNameAction INI

D:7 R:7 = Action ChangeNameAction END

D:8 R:7 = Action ChangeNameAction INI

D:8 R:8 = Action ChangeNameAction END

D:9 R:8 = Action ChangeNameAction INI

D:9 R:9 = Action ChangeNameAction END

D:10 R:9 = Action ChangeNameAction INI

D:10 R:10 = Action ChangeNameAction END

D:11 R:10 = Action ChangeNameAction INI

D:11 R:11 = Action ChangeNameAction END

D:12 R:11 = Action ChangeNameAction INI

D:12 R:12 = Action ChangeNameAction END

D:13 R:12 = Action ChangeNameAction INI

D:13 R:13 = Action ChangeNameAction END

D:14 R:13 = Action ChangeNameAction INI

D:14 R:14 = Action ChangeNameAction END

D:15 R:14 = Action ChangeNameAction INI

D:15 R:15 = Action ChangeNameAction END

D:16 R:15 = Action ChangeNameAction INI

D:16 R:16 = Action ChangeNameAction END

-
RESULTS:
(state:John, db: John)
(state:0, db: John)
(state:1, db: John)
(state:2, db: John)
(state:3, db: John)
(state:4, db: 0)
(state:5, db: 0)
(state:6, db: 0)
(state:7, db: 0)
(state:8, db: 3)
(state:9, db: 3)
(state:10, db: 3)
(state:11, db: 7)
(state:12, db: 7)
(state:13, db: 7)
(state:14, db: 7)
(state:15, db: 11)
-
00:06 +74 -11: /Users/matthew/gadfly/forks/async_redux/test/persistence_test.dart: There is no throttle. Each save takes 215 milliseconds. The state is changed each 60 milliseconds. Here we test that the initial state is persisted, and then that the state and the persistence occur when they should. [E]
  Expected: '(state:John, db: John)(state:0, db: John)(state:1, db: John)(state:2, db: John)(state:3, db: John)(state:4, db: 0)(state:5, db: 0)(state:6, db: 0)(state:7, db: 0)(state:8, db: 3)(state:9, db: 3)(state:10, db: 3)(state:11, db: 7)(state:12, db: 7)(state:13, db: 7)(state:14, db: 7)(state:15, db: 10)'
    Actual: '(state:John, db: John)(state:0, db: John)(state:1, db: John)(state:2, db: John)(state:3, db: John)(state:4, db: 0)(state:5, db: 0)(state:6, db: 0)(state:7, db: 0)(state:8, db: 3)(state:9, db: 3)(state:10, db: 3)(state:11, db: 7)(state:12, db: 7)(state:13, db: 7)(state:14, db: 7)(state:15, db: 11)'
     Which: is different.
            Expected: ... :15, db: 10)
              Actual: ... :15, db: 11)
                                    ^
             Differ at offset 295

  package:test_api             expect
  persistence_test.dart 238:5  main.<fn>

00:06 +74 -11: /Users/matthew/gadfly/forks/async_redux/test/persistence_test.dart: There is a 300 millis throttle. A first state change happens. A save starts immediately.A second state change happens 100 millis after the first. No other state changes happen. A second save will happen at 300 millis. This second save is necessary to save the second state change.
New StoreTester.
D:1 R:0 = Action ChangeNameAction INI

D:1 R:1 = Action ChangeNameAction END

D:2 R:1 = Action ChangeNameAction INI

D:2 R:2 = Action ChangeNameAction END

-
RESULTS:
(state:John, db: John)
(state:1st, db: 1st)
(state:1st, db: 1st)
(state:2nd, db: 1st)
(state:2nd, db: 1st)
(state:2nd, db: 1st)
(state:2nd, db: 2nd)
-
00:07 +75 -11: /Users/matthew/gadfly/forks/async_redux/test/persistence_test.dart: There is a 300 save duration, and no throttle. A first state change happens. A save starts immediately.A second state change happens 100 millis after the first. No other state changes happen. A second save will happen at 300 millis. This second save is necessary to save the second state change.
New StoreTester.
D:1 R:0 = Action ChangeNameAction INI

D:1 R:1 = Action ChangeNameAction END

D:2 R:1 = Action ChangeNameAction INI

D:2 R:2 = Action ChangeNameAction END

-
RESULTS:
(state:John, db: John)
(state:1st, db: John)
(state:1st, db: John)
(state:2nd, db: John)
(state:2nd, db: John)
(state:2nd, db: John)
(state:2nd, db: 1st)
(state:2nd, db: 1st)
(state:2nd, db: 2nd)
-
00:08 +76 -11: /Users/matthew/gadfly/forks/async_redux/test/persistence_test.dart: There is throttle period of 300 millis. A first state change happens. A save starts immediately.A second state change happens 100 millis after the first. However at 150 a PersistAction is dispatched. And this saves the second state change right away.
New StoreTester.
D:1 R:0 = Action ChangeNameAction INI

D:1 R:1 = Action ChangeNameAction END

D:2 R:1 = Action ChangeNameAction INI

D:2 R:2 = Action ChangeNameAction END

D:3 R:2 = Action PersistAction<AppState> INI

D:3 R:3 = Action PersistAction<AppState> END

-
RESULTS:
(state:John, db: John)
(state:1st, db: 1st)
(state:1st, db: 1st)
(state:2nd, db: 1st)
(state:2nd, db: 1st)
(state:2nd, db: 2nd)
(state:2nd, db: 2nd)
-
00:09 +77 -11: Some tests failed.

And flutter doctor:

matthew@ ~/gadfly/forks/async_redux (master) $ flutter doctor -v
[✓] Flutter (Channel beta, v1.13.6, on Mac OS X 10.15.2 19C57, locale en-US)
    • Flutter version 1.13.6 at /Users/matthew/gadfly/flutter_versions/flutter_1.13.6_beta
    • Framework revision 659dc8129d (4 weeks ago), 2019-12-30 09:24:47 -0800
    • Engine revision bdc9708d23
    • Dart version 2.8.0 (build 2.8.0-dev.0.0 c547f5d933)

[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    • Android SDK at /Users/matthew/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-29, build-tools 28.0.3
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 11.3.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 11.3.1, Build version 11C504
    • CocoaPods version 1.8.4

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 3.4)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 35.2.1
    • Dart plugin version 183.6270
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)

[✓] IntelliJ IDEA Community Edition (version 2019.3.2)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin version 42.1.4
    • Dart plugin version 193.6015.9

[✓] VS Code (version 1.40.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.4.1

[✓] Connected device (3 available)
    • iPhone 8   • AD7A90EB-5E73-427E-B9B7-DD3B07E2FEF1 • ios            • com.apple.CoreSimulator.SimRuntime.iOS-13-3 (simulator)
    • Chrome     • chrome                               • web-javascript • Google Chrome 79.0.3945.130
    • Web Server • web-server                           • web-javascript • Flutter Tools

• No issues found!
marcglasberg commented 4 years ago

@kuhnroyal Could you please tell me if version 2.5.3 solves this problem? Thanks.

kuhnroyal commented 4 years ago

Looks like the 2.5.3 didn't get released.

marcglasberg commented 4 years ago

@kuhnroyal Sorry, I had pushed it to GitHub only. Now it's in dart-pub, version 2.5.4.

kuhnroyal commented 4 years ago

Thanks, seems to work now 👍