Commit 843f58b7 authored by James Hughes's avatar James Hughes
Browse files

Clean up of tests

parent d3c60da9
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -40,8 +40,6 @@ public class KineticDiscovery {
    private var discoverStopping = false
    private var s:Datagram? = nil

    var done = dispatch_semaphore_create(0)

    
    init (multicast mAddr:String = "239.1.2.3", port mPort:String = "8123", timeout:Double = 0, f:(AnyObject)->()) throws {
        
@@ -49,12 +47,10 @@ public class KineticDiscovery {
        
        discoverRunning = true
        
        
        dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0)) {
            do {
                defer {
                    self.discoverRunning = false
                    dispatch_semaphore_signal(self.done)
                }
    
                while true {
@@ -70,7 +66,6 @@ public class KineticDiscovery {
                
            } catch let x {
                self.error = x
                print(String(x))
            }
        }
        
+3 −1
Original line number Diff line number Diff line
@@ -48,7 +48,9 @@ public class NetworkChannel: CustomStringConvertible, KineticChannel {
    // KineticChannel
    weak public private(set) var session: KineticSession? = nil
    public var connected: Bool {
        return !stream!.eof
        if stream!.eof     {return false}
        if stream!.closing {return false}
        return true
    }
    
    internal init(host:String, port:Int, timeout: Double = NetworkChannel.DEFAULT_CONNECT_TIMEOUT) throws {
+2 −0
Original line number Diff line number Diff line
@@ -104,6 +104,8 @@ public class KineticSession {
                        debugPrint("Oops: Unsolicited or unexpected ACK :/")
                        debugPrint(raw.command)
                    }
                } catch KineticEncoding.Error.Closed {
                    break
                } catch let err {
                    self.error = err
                    self.close()
+3 −2
Original line number Diff line number Diff line
@@ -40,10 +40,11 @@ class KineticDiscoveryTests: XCTestCase {
    }
    
    func testPrintAllWWN() {
        let wwn:String = KineticDiscovery.jroot.world_wide_name.rawValue
        var WWNs = Set<String>()
        do {
            let s = try KineticDiscovery() { j in
                WWNs.insert(j["world_wide_name"]!! as! String)
                WWNs.insert(j[wwn]!! as! String)
            }
            delay(6)
            s.stop()
+1 −1
Original line number Diff line number Diff line
@@ -29,7 +29,7 @@ CHECKOUT OPTIONS:
    :commit: ad4db3095a9ccc034c1eb65934a89c670012e6a0
    :git: https://github.com/krzyzanowskim/CryptoSwift
  Socket:
    :commit: e747f958de049373dc21e9c87f26b5d5cd4f76ef
    :commit: 1b78a7937377b8d21e6a20f7d80e04adfda46b6d
    :git: https://github.com/jphughes/socket-swift

SPEC CHECKSUMS:
Loading