From 5deb366a714d435fd4c04efd5b1780824cd72c23 Mon Sep 17 00:00:00 2001 From: Bernard Normier Date: Mon, 11 Nov 2024 11:44:30 -0500 Subject: [PATCH 1/3] Speed-up binding test on Windows (#3113) --- cpp/test/Ice/binding/Client.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cpp/test/Ice/binding/Client.cpp b/cpp/test/Ice/binding/Client.cpp index 27616e55401..2b03a1e2546 100644 --- a/cpp/test/Ice/binding/Client.cpp +++ b/cpp/test/Ice/binding/Client.cpp @@ -17,7 +17,10 @@ class Client : public Test::TestHelper void Client::run(int argc, char** argv) { - Ice::CommunicatorHolder communicator = initialize(argc, argv); + Ice::PropertiesPtr properties = createTestProperties(argc, argv); + // Speed-up connection establishment failure on Windows. + properties->setProperty("Ice.Connection.Client.ConnectTimeout", "1"); + Ice::CommunicatorHolder communicator = initialize(argc, argv, properties); void allTests(Test::TestHelper*); allTests(this); } From dbc8002b334a399b8edd924cb332b8762ddf4c60 Mon Sep 17 00:00:00 2001 From: Jose Date: Mon, 11 Nov 2024 17:46:33 +0100 Subject: [PATCH 2/3] Fix dynamic property warning in PHP slicing/objects test (#3115) --- php/test/Ice/slicing/objects/Client.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/php/test/Ice/slicing/objects/Client.php b/php/test/Ice/slicing/objects/Client.php index 3eda7948fe5..f654a58688d 100644 --- a/php/test/Ice/slicing/objects/Client.php +++ b/php/test/Ice/slicing/objects/Client.php @@ -408,7 +408,10 @@ function allTests($helper) $d1->pb = null; $d1->pd1 = null; $b1->pb = null; - $p1->pd1 = null; + if($p1 instanceof Test\D3) + { + $p1->pd3 = null; + } } echo "ok\n"; From 46f2de5013f1602f4cb2a691eeaaabaf09860563 Mon Sep 17 00:00:00 2001 From: Jose Date: Mon, 11 Nov 2024 18:01:59 +0100 Subject: [PATCH 3/3] Fix bogus assert in JavaScript transceivers - Fix #3101 (#3117) --- js/src/Ice/OutgoingConnectionFactory.js | 9 ++------- js/src/Ice/TcpTransceiver.js | 3 ++- js/src/Ice/WSTransceiver.js | 4 ++-- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/js/src/Ice/OutgoingConnectionFactory.js b/js/src/Ice/OutgoingConnectionFactory.js index d0f3b88642e..80d30bad4a0 100644 --- a/js/src/Ice/OutgoingConnectionFactory.js +++ b/js/src/Ice/OutgoingConnectionFactory.js @@ -239,13 +239,8 @@ export class OutgoingConnectionFactory { this._connectionOptions, ); } catch (ex) { - if (ex instanceof LocalException) { - try { - transceiver.close(); - } catch (exc) { - // Ignore - } - } + Debug.assert(ex instanceof LocalException); + transceiver.close(); throw ex; } diff --git a/js/src/Ice/TcpTransceiver.js b/js/src/Ice/TcpTransceiver.js index e2d3f587611..b985a5590e2 100644 --- a/js/src/Ice/TcpTransceiver.js +++ b/js/src/Ice/TcpTransceiver.js @@ -118,7 +118,8 @@ if (typeof net.createConnection === "function") { close() { if (this._fd === null) { - Debug.assert(this._exception); // Socket creation failed. + // Socket creation failed or not yet initialized, the later can happen if the connection creation throws + // before calling transceiver initialize. return; } diff --git a/js/src/Ice/WSTransceiver.js b/js/src/Ice/WSTransceiver.js index ef4622f1a90..25db1cb602b 100644 --- a/js/src/Ice/WSTransceiver.js +++ b/js/src/Ice/WSTransceiver.js @@ -102,7 +102,8 @@ if (typeof WebSocket !== "undefined") { close() { if (this._fd === null) { - Debug.assert(this._exception); // Websocket creation failed. + // Socket creation failed or not yet initialized, the later can happen if the connection creation throws + // before calling transceiver initialize. return; } @@ -122,7 +123,6 @@ if (typeof WebSocket !== "undefined") { return; } - Debug.assert(this._fd !== null); try { this._state = StateClosed; this._fd.close();