thaliproject / Thali_CordovaPlugin

Thali p2p plugin
MIT License
226 stars 44 forks source link

Tests: Fix failing tests on Android #1905

Open jareksl opened 7 years ago

jareksl commented 7 years ago

All tests pass in case when there are two devices used. In case of three devices, some of tests are failing. It is not deterministic. All failing tests passes without problems when executed separately.

Tests below fail on android devices:

  1. testThaliMobileNative.js
    • Can connect to a remote peer
    • Can shift data securely
    • discoveryAdvertisingStateUpdateNonTCP is called
    • peerAvailabilityChange is called
  2. testThaliMobileNativeAndroid.js
    • Get error when trying to double connect to a peer on Android
    • startUpdateAdvertisingAndListening - destroying the local connection kills the connection to the remote peer

    • startUpdateAdvertisingAndListening - ending the local connection

    • startUpdateAdvertisingAndListening - ending remote peers connection kills the local connection

  3. testThaliNotification.js
    • Client to server request coordinated
  4. testThaliMobileNativeWrapper.js
    • We provide notification when a listener dies and we recreate it
  5. testThaliPullReplicationFromNotificationCoordinated.js
    • Coordinated pull replication from notification test
  6. testThaliMobile
    • test for data corruption - 'TypeError: serversManager is null'