... sync
authorVolker Birk <vb@pep.foundation>
Thu, 23 Aug 2018 15:33:19 +0200
branchsync
changeset 2887c5ab1f6ad3ee
parent 2886 ee600afcb920
child 2888 5359f8f5cc5c
...
test/include/SyncTests.h
test/src/engine_tests/SyncTests.cc
     1.1 --- a/test/include/SyncTests.h	Thu Aug 23 15:23:31 2018 +0200
     1.2 +++ b/test/include/SyncTests.h	Thu Aug 23 15:33:19 2018 +0200
     1.3 @@ -41,6 +41,7 @@
     1.4          Sync_Adapter adapter;
     1.5          PEP_SESSION sync = NULL;
     1.6          thread *sync_thread;
     1.7 +
     1.8          void check_sync();
     1.9  };
    1.10  
     2.1 --- a/test/src/engine_tests/SyncTests.cc	Thu Aug 23 15:23:31 2018 +0200
     2.2 +++ b/test/src/engine_tests/SyncTests.cc	Thu Aug 23 15:33:19 2018 +0200
     2.3 @@ -132,6 +132,11 @@
     2.4  
     2.5  void SyncTests::tear_down()
     2.6  {
     2.7 +    cout << "waiting for processing\n";
     2.8 +    while (!adapter.q.empty()) {
     2.9 +        sleep(1);
    2.10 +    }
    2.11 +
    2.12      cout << "sending shutdown to sync thread\n";
    2.13      adapter.q.push_front(nullptr);
    2.14      sync_thread->join();
    2.15 @@ -144,12 +149,10 @@
    2.16  
    2.17  void SyncTests::check_sync()
    2.18  {
    2.19 -    cout << "trigger KeyGen event\n";
    2.20 +    cout << "check_sync(): trigger KeyGen event\n";
    2.21      signal_Sync_event(sync, Sync_PR_keysync, KeyGen);
    2.22  
    2.23 -    cout << "waiting for processing\n";
    2.24 -    while (!adapter.q.empty()) {
    2.25 -        sleep(1);
    2.26 -    }
    2.27 +    cout << "check_sync(): cry for unknown key\n";
    2.28 +    signal_Sync_event(sync, Sync_PR_keysync, CannotDecrypt);
    2.29  }
    2.30