diff options
author | Bernard Normier <bernard@zeroc.com> | 2019-06-19 17:38:47 -0400 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2019-06-19 17:38:47 -0400 |
commit | bf565e25a3159e3a9016f89d06562ec2ba2af737 (patch) | |
tree | 795a29a12c688fb7758512231f5f5563666db2ac | |
parent | Fix warning: endpos was assign but never read (diff) | |
download | ice-bf565e25a3159e3a9016f89d06562ec2ba2af737.tar.bz2 ice-bf565e25a3159e3a9016f89d06562ec2ba2af737.tar.xz ice-bf565e25a3159e3a9016f89d06562ec2ba2af737.zip |
Switch to ice_fixed to create fixed proxies
-rw-r--r-- | swift/test/Ice/ami/AllTests.swift | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/swift/test/Ice/ami/AllTests.swift b/swift/test/Ice/ami/AllTests.swift index a5d26f93651..dadc3d84043 100644 --- a/swift/test/Ice/ami/AllTests.swift +++ b/swift/test/Ice/ami/AllTests.swift @@ -236,8 +236,7 @@ func allTests(_ helper: TestHelper, collocated: Bool = false) throws { do { do { try test(p.opBatchCount() == 0) - let b1 = try uncheckedCast(prx: p.ice_getConnection()!.createProxy(p.ice_getIdentity()), - type: TestIntfPrx.self).ice_batchOneway() + let b1 = try p.ice_fixed(p.ice_getConnection()!).ice_batchOneway() try b1.opBatch() try b1.opBatch() var r: Promise<Void>! @@ -252,8 +251,7 @@ func allTests(_ helper: TestHelper, collocated: Bool = false) throws { } try test(p.opBatchCount() == 0) - let b1 = try uncheckedCast(prx: p.ice_getConnection()!.createProxy(p.ice_getIdentity()), - type: TestIntfPrx.self).ice_batchOneway() + let b1 = try p.ice_fixed(p.ice_getConnection()!).ice_batchOneway() try b1.opBatch() try b1.ice_getConnection()!.close(.GracefullyWithWait) @@ -270,8 +268,7 @@ func allTests(_ helper: TestHelper, collocated: Bool = false) throws { // Async task - 1 connection. // try test(p.opBatchCount() == 0) - let b1 = try uncheckedCast(prx: p.ice_getConnection()!.createProxy(p.ice_getIdentity()), - type: TestIntfPrx.self).ice_batchOneway() + let b1 = try p.ice_fixed(p.ice_getConnection()!).ice_batchOneway() try b1.opBatch() try b1.opBatch() var r: Promise<Void>! @@ -288,8 +285,7 @@ func allTests(_ helper: TestHelper, collocated: Bool = false) throws { // do { try test(p.opBatchCount() == 0) - let b1 = try uncheckedCast(prx: p.ice_getConnection()!.createProxy(p.ice_getIdentity()), - type: TestIntfPrx.self).ice_batchOneway() + let b1 = try p.ice_fixed(p.ice_getConnection()!).ice_batchOneway() try b1.opBatch() try b1.ice_getConnection()!.close(.GracefullyWithWait) var r: Promise<Void>! @@ -309,10 +305,7 @@ func allTests(_ helper: TestHelper, collocated: Bool = false) throws { try test(p.opBatchCount() == 0) let b1 = try p.ice_fixed(p.ice_getConnection()!).ice_batchOneway() let con = try p.ice_connectionId("2").ice_getConnection()! - let b2 = try uncheckedCast(prx: con.createProxy(p.ice_getIdentity()), - type: TestIntfPrx.self).ice_batchOneway() - - _ = try b2.ice_getConnection() // Ensure connection is established. + let b2 = p.ice_fixed(con).ice_batchOneway() try b1.opBatch() try b1.opBatch() try b2.opBatch() |