tweaks
This commit is contained in:
parent
3791b9c112
commit
3025911502
@ -10,7 +10,7 @@ import XCTest
|
|||||||
|
|
||||||
class AbstractSocketTest: XCTestCase {
|
class AbstractSocketTest: XCTestCase {
|
||||||
static let serverURL = "localhost:6979"
|
static let serverURL = "localhost:6979"
|
||||||
static let TEST_TIMEOUT = 8.0
|
static let TEST_TIMEOUT = 3.0
|
||||||
static var socket: SocketIOClient!
|
static var socket: SocketIOClient!
|
||||||
static let regularSocket = SocketIOClient(socketURL: AbstractSocketTest.serverURL, opts: [
|
static let regularSocket = SocketIOClient(socketURL: AbstractSocketTest.serverURL, opts: [
|
||||||
"reconnects": true, // default true
|
"reconnects": true, // default true
|
||||||
@ -31,12 +31,6 @@ class AbstractSocketTest: XCTestCase {
|
|||||||
"nsp": "/swift"])
|
"nsp": "/swift"])
|
||||||
var testKind:TestKind?
|
var testKind:TestKind?
|
||||||
|
|
||||||
// override func setUp() {
|
|
||||||
// super.setUp()
|
|
||||||
// openConnection(AbstractSocketTest.socket)
|
|
||||||
// openConnection(AbstractSocketTest.namespaceSocket)
|
|
||||||
// }
|
|
||||||
|
|
||||||
func openConnection(socket: SocketIOClient) {
|
func openConnection(socket: SocketIOClient) {
|
||||||
guard socket.status == SocketIOClientStatus.NotConnected else {return}
|
guard socket.status == SocketIOClientStatus.NotConnected else {return}
|
||||||
|
|
||||||
|
|||||||
@ -16,7 +16,7 @@ class SocketAcknowledgementTest: AbstractSocketTest {
|
|||||||
testKind = TestKind.Acknowledgement
|
testKind = TestKind.Acknowledgement
|
||||||
openConnection(AbstractSocketTest.socket)
|
openConnection(AbstractSocketTest.socket)
|
||||||
}
|
}
|
||||||
|
|
||||||
func testConnectionStatus() {
|
func testConnectionStatus() {
|
||||||
super.checkConnectionStatus()
|
super.checkConnectionStatus()
|
||||||
}
|
}
|
||||||
|
|||||||
@ -17,10 +17,6 @@ class SocketEmitTest: AbstractSocketTest {
|
|||||||
openConnection(AbstractSocketTest.socket)
|
openConnection(AbstractSocketTest.socket)
|
||||||
}
|
}
|
||||||
|
|
||||||
override func tearDown() {
|
|
||||||
super.tearDown()
|
|
||||||
}
|
|
||||||
|
|
||||||
func testConnectionStatus() {
|
func testConnectionStatus() {
|
||||||
super.checkConnectionStatus()
|
super.checkConnectionStatus()
|
||||||
}
|
}
|
||||||
|
|||||||
@ -14,7 +14,7 @@ class SocketNamespaceAcknowledgementTest: AbstractSocketTest {
|
|||||||
super.setUp()
|
super.setUp()
|
||||||
AbstractSocketTest.socket = AbstractSocketTest.namespaceSocket
|
AbstractSocketTest.socket = AbstractSocketTest.namespaceSocket
|
||||||
testKind = TestKind.Acknowledgement
|
testKind = TestKind.Acknowledgement
|
||||||
openConnection(AbstractSocketTest.namespaceSocket)
|
openConnection(AbstractSocketTest.socket)
|
||||||
}
|
}
|
||||||
|
|
||||||
func testConnectionStatus() {
|
func testConnectionStatus() {
|
||||||
|
|||||||
@ -14,7 +14,7 @@ class SocketNamespaceEmitTest: AbstractSocketTest {
|
|||||||
super.setUp()
|
super.setUp()
|
||||||
AbstractSocketTest.socket = AbstractSocketTest.namespaceSocket
|
AbstractSocketTest.socket = AbstractSocketTest.namespaceSocket
|
||||||
testKind = TestKind.Emit
|
testKind = TestKind.Emit
|
||||||
openConnection(AbstractSocketTest.namespaceSocket)
|
openConnection(AbstractSocketTest.socket)
|
||||||
}
|
}
|
||||||
|
|
||||||
func testConnectionStatus() {
|
func testConnectionStatus() {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user