ably-cocoa/Ably-SoakTest-App
Toni Cárdenas ba07003c3a
Soak test (#916)
* Create Xcode artifacts to run soak test.

* Mock SRWebSocket class in SoakTest.

Create a ARTWebSocket protocol that SRWebSocket conforms to.

* Mock ARTURLSession class in SoakTest.

* Mock ARTReachability in SoakTest.

* Get basic path working: send and receive messages.

* Make SoakTest a UI test.

This is necessary in order to upload the test to Firebase.

Missing: signing.

* Add soaktest Fastlane lane with Firebase plugin.

* Lower soak test run time to a bit lower than Firebase's limit.

* Implement SoakTestReachability.

* Enable code coverage in soak test.

* Remove unused ARTRealtimeTransportDelegate.realtimeTransportUnavailable.

* Enable TSan for soak test.

* Travis: install Fastlane from Gemfile.

* Soak test: do more channel-related operations.

* Travis: it's bundle install, not gem install.

* Soak test: set maxIdleInterval.

* Soak test: make connection timeout possible.

* Do more realtime operations, and more randomly.

* Soak test: Also NACK messages.

* Soak test: Simulate more WS failures.

* Soak test: implement fake detach.

* Soak test: fail channel attach sometimes.

* [WIP] Soak test: implement token auth, with authUrl.

For some reason, this prevents the test from ending. Will fix later.

* Downgrade App-SoakTest-App to use Firebase-supported iOS API version.

* Copy channels for public iterate() on internal queue.

We were getting the iterator in the internal queue, but then doing the
copy into public wrappers in the caller's queue. So the internal queue
could then concurrently run a task that mutates the collection while
it's being copied.

Now the copying is done while still on the internal queue, on the common
ARTChannels; Rest and Realtime just provide mappers to copy into the
right public channel type.

Fixes #918 (probably?).

* Upgrade fastlane.

* Use the right GCP project ID for Firebase.

* Copy Ably.framework into soak test app bundle.

Otherwise we get this error:

Nov 29 07:05:57 iPhone Ably-SoakTest-AppUITests-Runner(XCTest)[3643] <Notice>: The bundle \M-b\M^@\M^\Ably-SoakTest-AppUITests\M-b\M^@\M^] couldn\M-b\M^@\M^Yt be loaded because it is damaged or missing necessary resources. Try reinstalling the bundle.
Nov 29 07:05:57 iPhone Ably-SoakTest-AppUITests-Runner(XCTest)[3643] <Notice>: (dlopen_preflight(/var/containers/Bundle/Application/304DA2ED-A23D-4513-8E33-E43BCD50DFDE/Ably-SoakTest-AppUITests-Runner.app/PlugIns/Ably-SoakTest-AppUITests.xctest/Ably-SoakTest-AppUITests): Library not loaded: @rpath/Ably.framework/Ably
  Referenced from: /var/containers/Bundle/Application/304DA2ED-A23D-4513-8E33-E43BCD50DFDE/Ably-SoakTest-AppUITests-Runner.app/PlugIns/Ably-SoakTest-AppUITests.xctest/Ably-SoakTest-AppUITests
  Reason: image not found)

I'm not sure why I don't get this when run locally in the simulator,
though.

* .travis.yml: Set PLATFORM in matrix as Carthage --platform parameter.

* Run soak test in Travis.

* Pass -allowProvisioningUpdates when building for soak test.

* fixup! Pass -allowProvisioningUpdates when building for soak test.

* Move file encrypted for Travis to travis/, where more will follow.

* Sign soak test app in Travis before upload to Firebase.

* Specify signing provisioning profiles for soak test targets.

* Fix code signing in Travis.

* Extract randomMessageData() helper.

* Don't queue.suspend(); actively stop doing things on test finish.

queue.suspend() just blocks threads on dispatch_sync.

* Implement presence.

* .travis.yml: Fix bad Bash in script line.

* Undo accidental softening of soak test params.

* Remove soak test from CI.

See https://github.com/ably/ably-cocoa/pull/916#issuecomment-560139404.

* Simplify how we configure URL session and WebSocket classes.

* Examples test: use Fastlane from our Gemfile.

* Remove workaround in Travis that doesn't seem to be relevant anymore.

Introduced at 2bacecebcc, builds now fail
with "no such file or directory" on this command, but otherwise pass.

* Reduce noise from soak test logs.

* Reduce number of concurrent connections in soak test to 100.

Firebase freaks out with 1000.
2019-12-09 11:14:26 +01:00
..
Assets.xcassets Soak test (#916) 2019-12-09 11:14:26 +01:00
Base.lproj Soak test (#916) 2019-12-09 11:14:26 +01:00
AppDelegate.swift Soak test (#916) 2019-12-09 11:14:26 +01:00
Info.plist Soak test (#916) 2019-12-09 11:14:26 +01:00
ViewController.swift Soak test (#916) 2019-12-09 11:14:26 +01:00