killConnections does not work as specified on iOS #663

Closed
vjrantal opened this Issue Mar 23, 2016 · 2 comments

Comments

Projects
None yet
4 participants
@vjrantal
Member

vjrantal commented Mar 23, 2016

The specification has killConnections documented like this:

/**
 * # WARNING: This method is intended for internal Thali testing only. DO NOT
 * USE!
 *
 * This method is only intended for iOS. It's job is to terminate all incoming
 * and outgoing multipeer connectivity framework browser, advertiser, MCSession
 * and stream connections immediately without using the normal stop and start
 * interfaces or TCP/IP level connections. The goal is to simulate what would
 * happen if we switched the phone to something like airplane mode. This
 * simulates what would happen if peers went out of range.
 *
 * This method MUST return "Not Supported" if called on Android. On Android we
 * can get this functionality by using JXCore's ability to disable the local
 * radios.
 *
 * | Error String | Description |
 * |--------------|-------------|
 * | Failed | Somehow the stop method couldn't do its job. Check the logs. |
 * | Not Supported | This method is not support on this platform. |
 *
 * @private
 * @returns {Promise<?Error>}
 */

However, on iOS, the implementation expects a peerIdentifier to be passed whereas the specification expects that all connections are killed.

Related to this, I renamed the function from killConnection to killConnections just so that there is a decent behavior when the function is called from the node layer.

@vjrantal vjrantal changed the title from killConnections does not work as specifies on iOS to killConnections does not work as specified on iOS Mar 23, 2016

@vjrantal

This comment has been minimized.

Show comment
Hide comment
@vjrantal

vjrantal Mar 23, 2016

Member

This can be reproduce with the unit test app and looks like this in the log:

,# 51. make sure we actually call kill connections properly
,2016-03-23 11:52:56.788 ThaliTest[2011:3475110] jxcore: killConnections
2016-03-23 11:52:56.789 ThaliTest[2011:3475110] jxcore: killConnections: badParam
,not ok 190 should not fail on iOS
  ---
,    operator: fail
,  ...
,# teardown
,# setup

The badParam is expected because we don't pass a peer identifier to the call.

Member

vjrantal commented Mar 23, 2016

This can be reproduce with the unit test app and looks like this in the log:

,# 51. make sure we actually call kill connections properly
,2016-03-23 11:52:56.788 ThaliTest[2011:3475110] jxcore: killConnections
2016-03-23 11:52:56.789 ThaliTest[2011:3475110] jxcore: killConnections: badParam
,not ok 190 should not fail on iOS
  ---
,    operator: fail
,  ...
,# teardown
,# setup

The badParam is expected because we don't pass a peer identifier to the call.

@vjrantal vjrantal added the 2 - Ready label Mar 24, 2016

@vjrantal vjrantal added this to the New Infra milestone Mar 24, 2016

@yaronyg yaronyg added 1 - Backlog and removed 2 - Ready labels Apr 6, 2016

@yaronyg

This comment has been minimized.

Show comment
Hide comment
@yaronyg

yaronyg Aug 3, 2016

Member

@baydet I'm assigning this to you to make sure we don't repeat the problem.

Member

yaronyg commented Aug 3, 2016

@baydet I'm assigning this to you to make sure we don't repeat the problem.

@yaronyg yaronyg closed this Aug 26, 2016

@yaronyg yaronyg removed the 1 - Backlog label Aug 26, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment