diff options
author | Mark Spruiell <mes@zeroc.com> | 2017-10-16 15:13:19 -0700 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2017-10-16 15:13:19 -0700 |
commit | e3a8081e63e0678fdd182d5258cc3b44b65ca462 (patch) | |
tree | ed1bf78f927ea730fc28a93c3d37daec0a8241cd | |
parent | Register plug-ins with MATLAB extension (diff) | |
download | ice-e3a8081e63e0678fdd182d5258cc3b44b65ca462.tar.bz2 ice-e3a8081e63e0678fdd182d5258cc3b44b65ca462.tar.xz ice-e3a8081e63e0678fdd182d5258cc3b44b65ca462.zip |
ICE-8543 - Test clean-up; properties fix
-rw-r--r-- | matlab/src/Properties.cpp | 2 | ||||
-rw-r--r-- | matlab/test/Ice/acm/client.m (renamed from matlab/test/Ice/acm/Client.m) | 4 | ||||
-rw-r--r-- | matlab/test/Ice/acm/runTest.m | 9 | ||||
-rw-r--r-- | matlab/test/Ice/ami/client.m (renamed from matlab/test/Ice/ami/Client.m) | 4 | ||||
-rw-r--r-- | matlab/test/Ice/ami/runTest.m | 9 | ||||
-rw-r--r-- | matlab/test/Ice/binding/client.m (renamed from matlab/test/Ice/binding/Client.m) | 4 | ||||
-rw-r--r-- | matlab/test/Ice/binding/runTest.m | 9 | ||||
-rw-r--r-- | matlab/test/Ice/defaultValue/client.m (renamed from matlab/test/Ice/info/Client.m) | 4 | ||||
-rw-r--r-- | matlab/test/Ice/defaultValue/runTest.m | 9 | ||||
-rw-r--r-- | matlab/test/Ice/enums/client.m (renamed from matlab/test/Ice/enums/Client.m) | 4 | ||||
-rw-r--r-- | matlab/test/Ice/enums/runTest.m | 9 | ||||
-rw-r--r-- | matlab/test/Ice/exceptions/client.m (renamed from matlab/test/Ice/exceptions/Client.m) | 4 | ||||
-rw-r--r-- | matlab/test/Ice/exceptions/runTest.m | 9 | ||||
-rw-r--r-- | matlab/test/Ice/facets/client.m (renamed from matlab/test/Ice/facets/Client.m) | 4 | ||||
-rw-r--r-- | matlab/test/Ice/facets/runTest.m | 9 | ||||
-rw-r--r-- | matlab/test/Ice/info/client.m (renamed from matlab/test/Ice/defaultValue/Client.m) | 4 | ||||
-rw-r--r-- | matlab/test/Ice/info/runTest.m | 9 | ||||
-rw-r--r-- | matlab/test/Ice/inheritance/client.m (renamed from matlab/test/Ice/inheritance/Client.m) | 4 | ||||
-rw-r--r-- | matlab/test/Ice/inheritance/runTest.m | 9 | ||||
-rw-r--r-- | matlab/test/Ice/objects/client.m (renamed from matlab/test/Ice/objects/Client.m) | 4 | ||||
-rw-r--r-- | matlab/test/Ice/objects/runTest.m | 9 | ||||
-rw-r--r-- | matlab/test/Ice/operations/client.m (renamed from matlab/test/Ice/operations/Client.m) | 4 | ||||
-rw-r--r-- | matlab/test/Ice/operations/runTest.m | 9 | ||||
-rw-r--r-- | matlab/test/Ice/optional/client.m (renamed from matlab/test/Ice/optional/Client.m) | 4 | ||||
-rw-r--r-- | matlab/test/Ice/optional/runTest.m | 9 | ||||
-rw-r--r-- | matlab/test/Ice/proxy/client.m (renamed from matlab/test/Ice/proxy/Client.m) | 4 | ||||
-rw-r--r-- | matlab/test/Ice/proxy/runTest.m | 9 | ||||
-rw-r--r-- | matlab/test/Ice/slicing/exceptions/client.m (renamed from matlab/test/Ice/slicing/exceptions/Client.m) | 4 | ||||
-rw-r--r-- | matlab/test/Ice/slicing/exceptions/runTest.m | 9 | ||||
-rw-r--r-- | matlab/test/Ice/slicing/objects/client.m (renamed from matlab/test/Ice/slicing/objects/Client.m) | 4 | ||||
-rw-r--r-- | matlab/test/Ice/slicing/objects/runTest.m | 9 | ||||
-rw-r--r-- | matlab/test/Ice/timeout/AllTests.m | 55 | ||||
-rw-r--r-- | matlab/test/Ice/timeout/client.m (renamed from matlab/test/Ice/timeout/Client.m) | 4 | ||||
-rw-r--r-- | matlab/test/Ice/timeout/runTest.m | 9 | ||||
-rw-r--r-- | matlab/test/lib/runTest.m | 23 | ||||
-rw-r--r-- | scripts/Util.py | 5 |
36 files changed, 82 insertions, 211 deletions
diff --git a/matlab/src/Properties.cpp b/matlab/src/Properties.cpp index 39b76f58d81..b2bf39541e8 100644 --- a/matlab/src/Properties.cpp +++ b/matlab/src/Properties.cpp @@ -237,7 +237,7 @@ Ice_Properties_clone(void* self, void** r) { try { - *r = new shared_ptr<Ice::Properties>(deref<Ice::Properties>(self)); + *r = new shared_ptr<Ice::Properties>(deref<Ice::Properties>(self)->clone()); } catch(const std::exception& ex) { diff --git a/matlab/test/Ice/acm/Client.m b/matlab/test/Ice/acm/client.m index a77f062d7cf..960bf4014bd 100644 --- a/matlab/test/Ice/acm/Client.m +++ b/matlab/test/Ice/acm/client.m @@ -9,14 +9,14 @@ ICE_LICENSE file included in this distribution. ********************************************************************** %} -function Client(args) +function client(args) addpath('generated'); addpath('../../lib'); if ~libisloaded('ice') loadlibrary('ice', @iceproto) end - initData = TestApp.createInitData('Client', args); + initData = TestApp.createInitData('client', args); initData.properties_.setProperty('Ice.Warn.Connections', '0'); communicator = Ice.initialize(initData); cleanup = onCleanup(@() communicator.destroy()); diff --git a/matlab/test/Ice/acm/runTest.m b/matlab/test/Ice/acm/runTest.m deleted file mode 100644 index 397a1e1b97b..00000000000 --- a/matlab/test/Ice/acm/runTest.m +++ /dev/null @@ -1,9 +0,0 @@ -function runTest(varargin) - try - Client(varargin); - exit(0); - catch ex - disp(getReport(ex, 'extended')); - exit(1); - end -end diff --git a/matlab/test/Ice/ami/Client.m b/matlab/test/Ice/ami/client.m index 09c5d92e69f..bf6ab5682de 100644 --- a/matlab/test/Ice/ami/Client.m +++ b/matlab/test/Ice/ami/client.m @@ -9,14 +9,14 @@ ICE_LICENSE file included in this distribution. ********************************************************************** %} -function Client(args) +function client(args) addpath('generated'); addpath('../../lib'); if ~libisloaded('ice') loadlibrary('ice', @iceproto) end - initData = TestApp.createInitData('Client', args); + initData = TestApp.createInitData('client', args); initData.properties_.setProperty('Ice.Warn.AMICallback', '0'); initData.properties_.setProperty('Ice.Warn.Connections', '0'); % diff --git a/matlab/test/Ice/ami/runTest.m b/matlab/test/Ice/ami/runTest.m deleted file mode 100644 index 397a1e1b97b..00000000000 --- a/matlab/test/Ice/ami/runTest.m +++ /dev/null @@ -1,9 +0,0 @@ -function runTest(varargin) - try - Client(varargin); - exit(0); - catch ex - disp(getReport(ex, 'extended')); - exit(1); - end -end diff --git a/matlab/test/Ice/binding/Client.m b/matlab/test/Ice/binding/client.m index 398f82d0c27..49d30b951e9 100644 --- a/matlab/test/Ice/binding/Client.m +++ b/matlab/test/Ice/binding/client.m @@ -9,14 +9,14 @@ ICE_LICENSE file included in this distribution. ********************************************************************** %} -function Client(args) +function client(args) addpath('generated'); addpath('../../lib'); if ~libisloaded('ice') loadlibrary('ice', @iceproto) end - initData = TestApp.createInitData('Client', args); + initData = TestApp.createInitData('client', args); communicator = Ice.initialize(initData); cleanup = onCleanup(@() communicator.destroy()); diff --git a/matlab/test/Ice/binding/runTest.m b/matlab/test/Ice/binding/runTest.m deleted file mode 100644 index 397a1e1b97b..00000000000 --- a/matlab/test/Ice/binding/runTest.m +++ /dev/null @@ -1,9 +0,0 @@ -function runTest(varargin) - try - Client(varargin); - exit(0); - catch ex - disp(getReport(ex, 'extended')); - exit(1); - end -end diff --git a/matlab/test/Ice/info/Client.m b/matlab/test/Ice/defaultValue/client.m index 398f82d0c27..49d30b951e9 100644 --- a/matlab/test/Ice/info/Client.m +++ b/matlab/test/Ice/defaultValue/client.m @@ -9,14 +9,14 @@ ICE_LICENSE file included in this distribution. ********************************************************************** %} -function Client(args) +function client(args) addpath('generated'); addpath('../../lib'); if ~libisloaded('ice') loadlibrary('ice', @iceproto) end - initData = TestApp.createInitData('Client', args); + initData = TestApp.createInitData('client', args); communicator = Ice.initialize(initData); cleanup = onCleanup(@() communicator.destroy()); diff --git a/matlab/test/Ice/defaultValue/runTest.m b/matlab/test/Ice/defaultValue/runTest.m deleted file mode 100644 index 397a1e1b97b..00000000000 --- a/matlab/test/Ice/defaultValue/runTest.m +++ /dev/null @@ -1,9 +0,0 @@ -function runTest(varargin) - try - Client(varargin); - exit(0); - catch ex - disp(getReport(ex, 'extended')); - exit(1); - end -end diff --git a/matlab/test/Ice/enums/Client.m b/matlab/test/Ice/enums/client.m index 7ebcaa6708f..f72382dce51 100644 --- a/matlab/test/Ice/enums/Client.m +++ b/matlab/test/Ice/enums/client.m @@ -9,14 +9,14 @@ ICE_LICENSE file included in this distribution. ********************************************************************** %} -function Client(args) +function client(args) addpath('generated'); addpath('../../lib'); if ~libisloaded('ice') loadlibrary('ice', @iceproto) end - initData = TestApp.createInitData('Client', args); + initData = TestApp.createInitData('client', args); communicator = Ice.initialize(initData); cleanup = onCleanup(@() communicator.destroy()); diff --git a/matlab/test/Ice/enums/runTest.m b/matlab/test/Ice/enums/runTest.m deleted file mode 100644 index 397a1e1b97b..00000000000 --- a/matlab/test/Ice/enums/runTest.m +++ /dev/null @@ -1,9 +0,0 @@ -function runTest(varargin) - try - Client(varargin); - exit(0); - catch ex - disp(getReport(ex, 'extended')); - exit(1); - end -end diff --git a/matlab/test/Ice/exceptions/Client.m b/matlab/test/Ice/exceptions/client.m index 8377d9977fe..a2311cf7d69 100644 --- a/matlab/test/Ice/exceptions/Client.m +++ b/matlab/test/Ice/exceptions/client.m @@ -9,14 +9,14 @@ ICE_LICENSE file included in this distribution. ********************************************************************** %} -function Client(args) +function client(args) addpath('generated'); addpath('../../lib'); if ~libisloaded('ice') loadlibrary('ice', @iceproto) end - initData = TestApp.createInitData('Client', args); + initData = TestApp.createInitData('client', args); initData.properties_.setProperty('Ice.Warn.Connections', '0'); initData.properties_.setProperty('Ice.MessageSizeMax', '10'); % 10KB max communicator = Ice.initialize(initData); diff --git a/matlab/test/Ice/exceptions/runTest.m b/matlab/test/Ice/exceptions/runTest.m deleted file mode 100644 index 397a1e1b97b..00000000000 --- a/matlab/test/Ice/exceptions/runTest.m +++ /dev/null @@ -1,9 +0,0 @@ -function runTest(varargin) - try - Client(varargin); - exit(0); - catch ex - disp(getReport(ex, 'extended')); - exit(1); - end -end diff --git a/matlab/test/Ice/facets/Client.m b/matlab/test/Ice/facets/client.m index 8859a40eb0b..1acb827b102 100644 --- a/matlab/test/Ice/facets/Client.m +++ b/matlab/test/Ice/facets/client.m @@ -9,14 +9,14 @@ ICE_LICENSE file included in this distribution. ********************************************************************** %} -function Client(args) +function client(args) addpath('generated'); addpath('../../lib'); if ~libisloaded('ice') loadlibrary('ice', @iceproto) end - initData = TestApp.createInitData('Client', args); + initData = TestApp.createInitData('client', args); communicator = Ice.initialize(initData); cleanup = onCleanup(@() communicator.destroy()); diff --git a/matlab/test/Ice/facets/runTest.m b/matlab/test/Ice/facets/runTest.m deleted file mode 100644 index 397a1e1b97b..00000000000 --- a/matlab/test/Ice/facets/runTest.m +++ /dev/null @@ -1,9 +0,0 @@ -function runTest(varargin) - try - Client(varargin); - exit(0); - catch ex - disp(getReport(ex, 'extended')); - exit(1); - end -end diff --git a/matlab/test/Ice/defaultValue/Client.m b/matlab/test/Ice/info/client.m index 398f82d0c27..49d30b951e9 100644 --- a/matlab/test/Ice/defaultValue/Client.m +++ b/matlab/test/Ice/info/client.m @@ -9,14 +9,14 @@ ICE_LICENSE file included in this distribution. ********************************************************************** %} -function Client(args) +function client(args) addpath('generated'); addpath('../../lib'); if ~libisloaded('ice') loadlibrary('ice', @iceproto) end - initData = TestApp.createInitData('Client', args); + initData = TestApp.createInitData('client', args); communicator = Ice.initialize(initData); cleanup = onCleanup(@() communicator.destroy()); diff --git a/matlab/test/Ice/info/runTest.m b/matlab/test/Ice/info/runTest.m deleted file mode 100644 index 397a1e1b97b..00000000000 --- a/matlab/test/Ice/info/runTest.m +++ /dev/null @@ -1,9 +0,0 @@ -function runTest(varargin) - try - Client(varargin); - exit(0); - catch ex - disp(getReport(ex, 'extended')); - exit(1); - end -end diff --git a/matlab/test/Ice/inheritance/Client.m b/matlab/test/Ice/inheritance/client.m index c51df771b1e..dc999992ad9 100644 --- a/matlab/test/Ice/inheritance/Client.m +++ b/matlab/test/Ice/inheritance/client.m @@ -9,14 +9,14 @@ ICE_LICENSE file included in this distribution. ********************************************************************** %} -function Client(args) +function client(args) addpath('generated'); addpath('../../lib'); if ~libisloaded('ice') loadlibrary('ice', @iceproto) end - initData = TestApp.createInitData('Client', args); + initData = TestApp.createInitData('client', args); communicator = Ice.initialize(initData); cleanup = onCleanup(@() communicator.destroy()); diff --git a/matlab/test/Ice/inheritance/runTest.m b/matlab/test/Ice/inheritance/runTest.m deleted file mode 100644 index 397a1e1b97b..00000000000 --- a/matlab/test/Ice/inheritance/runTest.m +++ /dev/null @@ -1,9 +0,0 @@ -function runTest(varargin) - try - Client(varargin); - exit(0); - catch ex - disp(getReport(ex, 'extended')); - exit(1); - end -end diff --git a/matlab/test/Ice/objects/Client.m b/matlab/test/Ice/objects/client.m index ab00b2183c8..6d3771c7fed 100644 --- a/matlab/test/Ice/objects/Client.m +++ b/matlab/test/Ice/objects/client.m @@ -9,14 +9,14 @@ ICE_LICENSE file included in this distribution. ********************************************************************** %} -function Client(args) +function client(args) addpath('generated'); addpath('../../lib'); if ~libisloaded('ice') loadlibrary('ice', @iceproto) end - initData = TestApp.createInitData('Client', args); + initData = TestApp.createInitData('client', args); initData.properties_.setProperty('Ice.Warn.Connections', '0'); communicator = Ice.initialize(initData); cleanup = onCleanup(@() communicator.destroy()); diff --git a/matlab/test/Ice/objects/runTest.m b/matlab/test/Ice/objects/runTest.m deleted file mode 100644 index 397a1e1b97b..00000000000 --- a/matlab/test/Ice/objects/runTest.m +++ /dev/null @@ -1,9 +0,0 @@ -function runTest(varargin) - try - Client(varargin); - exit(0); - catch ex - disp(getReport(ex, 'extended')); - exit(1); - end -end diff --git a/matlab/test/Ice/operations/Client.m b/matlab/test/Ice/operations/client.m index 45e45042453..c6d5c1fd595 100644 --- a/matlab/test/Ice/operations/Client.m +++ b/matlab/test/Ice/operations/client.m @@ -9,14 +9,14 @@ ICE_LICENSE file included in this distribution. ********************************************************************** %} -function Client(args) +function client(args) addpath('generated'); addpath('../../lib'); if ~libisloaded('ice') loadlibrary('ice', @iceproto) end - initData = TestApp.createInitData('Client', args); + initData = TestApp.createInitData('client', args); initData.properties_.setProperty('Ice.ThreadPool.Client.Size', '2'); initData.properties_.setProperty('Ice.ThreadPool.Client.SizeWarn', '0'); initData.properties_.setProperty('Ice.BatchAutoFlushSize', '100'); diff --git a/matlab/test/Ice/operations/runTest.m b/matlab/test/Ice/operations/runTest.m deleted file mode 100644 index 397a1e1b97b..00000000000 --- a/matlab/test/Ice/operations/runTest.m +++ /dev/null @@ -1,9 +0,0 @@ -function runTest(varargin) - try - Client(varargin); - exit(0); - catch ex - disp(getReport(ex, 'extended')); - exit(1); - end -end diff --git a/matlab/test/Ice/optional/Client.m b/matlab/test/Ice/optional/client.m index c51df771b1e..dc999992ad9 100644 --- a/matlab/test/Ice/optional/Client.m +++ b/matlab/test/Ice/optional/client.m @@ -9,14 +9,14 @@ ICE_LICENSE file included in this distribution. ********************************************************************** %} -function Client(args) +function client(args) addpath('generated'); addpath('../../lib'); if ~libisloaded('ice') loadlibrary('ice', @iceproto) end - initData = TestApp.createInitData('Client', args); + initData = TestApp.createInitData('client', args); communicator = Ice.initialize(initData); cleanup = onCleanup(@() communicator.destroy()); diff --git a/matlab/test/Ice/optional/runTest.m b/matlab/test/Ice/optional/runTest.m deleted file mode 100644 index 397a1e1b97b..00000000000 --- a/matlab/test/Ice/optional/runTest.m +++ /dev/null @@ -1,9 +0,0 @@ -function runTest(varargin) - try - Client(varargin); - exit(0); - catch ex - disp(getReport(ex, 'extended')); - exit(1); - end -end diff --git a/matlab/test/Ice/proxy/Client.m b/matlab/test/Ice/proxy/client.m index 730f6266787..77c30afdf00 100644 --- a/matlab/test/Ice/proxy/Client.m +++ b/matlab/test/Ice/proxy/client.m @@ -9,14 +9,14 @@ ICE_LICENSE file included in this distribution. ********************************************************************** %} -function Client(args) +function client(args) addpath('generated'); addpath('../../lib'); if ~libisloaded('ice') loadlibrary('ice', @iceproto) end - initData = TestApp.createInitData('Client', args); + initData = TestApp.createInitData('client', args); communicator = Ice.initialize(initData); cleanup = onCleanup(@() communicator.destroy()); diff --git a/matlab/test/Ice/proxy/runTest.m b/matlab/test/Ice/proxy/runTest.m deleted file mode 100644 index 397a1e1b97b..00000000000 --- a/matlab/test/Ice/proxy/runTest.m +++ /dev/null @@ -1,9 +0,0 @@ -function runTest(varargin) - try - Client(varargin); - exit(0); - catch ex - disp(getReport(ex, 'extended')); - exit(1); - end -end diff --git a/matlab/test/Ice/slicing/exceptions/Client.m b/matlab/test/Ice/slicing/exceptions/client.m index 86bc5c08914..7837107f372 100644 --- a/matlab/test/Ice/slicing/exceptions/Client.m +++ b/matlab/test/Ice/slicing/exceptions/client.m @@ -9,14 +9,14 @@ ICE_LICENSE file included in this distribution. ********************************************************************** %} -function Client(args) +function client(args) addpath('generated'); addpath('../../../lib'); if ~libisloaded('ice') loadlibrary('ice', @iceproto) end - initData = TestApp.createInitData('Client', args); + initData = TestApp.createInitData('client', args); communicator = Ice.initialize(initData); cleanup = onCleanup(@() communicator.destroy()); diff --git a/matlab/test/Ice/slicing/exceptions/runTest.m b/matlab/test/Ice/slicing/exceptions/runTest.m deleted file mode 100644 index 397a1e1b97b..00000000000 --- a/matlab/test/Ice/slicing/exceptions/runTest.m +++ /dev/null @@ -1,9 +0,0 @@ -function runTest(varargin) - try - Client(varargin); - exit(0); - catch ex - disp(getReport(ex, 'extended')); - exit(1); - end -end diff --git a/matlab/test/Ice/slicing/objects/Client.m b/matlab/test/Ice/slicing/objects/client.m index 86bc5c08914..7837107f372 100644 --- a/matlab/test/Ice/slicing/objects/Client.m +++ b/matlab/test/Ice/slicing/objects/client.m @@ -9,14 +9,14 @@ ICE_LICENSE file included in this distribution. ********************************************************************** %} -function Client(args) +function client(args) addpath('generated'); addpath('../../../lib'); if ~libisloaded('ice') loadlibrary('ice', @iceproto) end - initData = TestApp.createInitData('Client', args); + initData = TestApp.createInitData('client', args); communicator = Ice.initialize(initData); cleanup = onCleanup(@() communicator.destroy()); diff --git a/matlab/test/Ice/slicing/objects/runTest.m b/matlab/test/Ice/slicing/objects/runTest.m deleted file mode 100644 index 397a1e1b97b..00000000000 --- a/matlab/test/Ice/slicing/objects/runTest.m +++ /dev/null @@ -1,9 +0,0 @@ -function runTest(varargin) - try - Client(varargin); - exit(0); - catch ex - disp(getReport(ex, 'extended')); - exit(1); - end -end diff --git a/matlab/test/Ice/timeout/AllTests.m b/matlab/test/Ice/timeout/AllTests.m index ef9ad95e02d..bf0b1a089cd 100644 --- a/matlab/test/Ice/timeout/AllTests.m +++ b/matlab/test/Ice/timeout/AllTests.m @@ -37,11 +37,6 @@ classdef AllTests obj = communicator.stringToProxy(sref); assert(~isempty(obj)); - mult = 1; - if ~strcmp(communicator.getProperties().getPropertyWithDefault('Ice.Default.Protocol', 'tcp'), 'tcp') - mult = 4; - end - timeout = TimeoutPrx.checkedCast(obj); assert(~isempty(timeout)); @@ -50,8 +45,8 @@ classdef AllTests % % Expect ConnectTimeoutException. % - to = timeout.ice_timeout(100 * mult); - timeout.holdAdapter(500 * mult); + to = timeout.ice_timeout(100); + timeout.holdAdapter(500); try to.op(); assert(false); @@ -64,8 +59,8 @@ classdef AllTests % Expect success. % timeout.op(); % Ensure adapter is active. - to = timeout.ice_timeout(1000 * mult); - timeout.holdAdapter(500 * mult); + to = timeout.ice_timeout(1000); + timeout.holdAdapter(500); try to.op(); catch ex @@ -89,7 +84,7 @@ classdef AllTests % to = timeout.ice_timeout(250); AllTests.connect(to); - timeout.holdAdapter(750 * mult); + timeout.holdAdapter(750); try to.sendData(seq); assert(false); @@ -102,8 +97,8 @@ classdef AllTests % Expect success. % timeout.op(); % Ensure adapter is active. - to = timeout.ice_timeout(1000 * mult); - timeout.holdAdapter(500 * mult); + to = timeout.ice_timeout(1000); + timeout.holdAdapter(500); try to.sendData(zeros(1, 1000000, 'uint8')); catch ex @@ -122,16 +117,16 @@ classdef AllTests to = timeout.ice_invocationTimeout(100); assert(connection == to.ice_getConnection()); try - to.sleep(750 * mult); + to.sleep(750); assert(false); catch ex assert(isa(ex, 'Ice.InvocationTimeoutException')); end obj.ice_ping(); - to = TimeoutPrx.checkedCast(obj.ice_invocationTimeout(500 * mult)); + to = TimeoutPrx.checkedCast(obj.ice_invocationTimeout(500)); assert(connection == to.ice_getConnection()); try - to.sleep(100 * mult); + to.sleep(100); catch ex if isa(ex, 'Ice.InvocationTimeoutException') assert(false); @@ -145,7 +140,7 @@ classdef AllTests % Expect InvocationTimeoutException. % to = timeout.ice_invocationTimeout(100); - f = to.sleepAsync(750 * mult); + f = to.sleepAsync(750); try f.fetchOutputs(); catch ex @@ -156,8 +151,8 @@ classdef AllTests % % Expect success. % - to = timeout.ice_invocationTimeout(500 * mult); - f = to.sleepAsync(100 * mult); + to = timeout.ice_invocationTimeout(500); + f = to.sleepAsync(100); f.fetchOutputs(); % @@ -209,7 +204,7 @@ classdef AllTests fprintf('testing close timeout... '); - to = TimeoutPrx.uncheckedCast(obj.ice_timeout(250 * mult)); + to = TimeoutPrx.uncheckedCast(obj.ice_timeout(250)); connection = AllTests.connect(to); timeout.holdAdapter(600); connection.close(Ice.ConnectionClose.GracefullyWithWait); @@ -219,7 +214,7 @@ classdef AllTests assert(false); end - pause(.650 * mult); + pause(.650); try connection.getInfo(); @@ -245,7 +240,7 @@ classdef AllTests comm = Ice.initialize(initData); to = TimeoutPrx.uncheckedCast(comm.stringToProxy(sref)); AllTests.connect(to); - timeout.holdAdapter(500 * mult); + timeout.holdAdapter(500); try to.sendData(seq); assert(false); @@ -257,9 +252,9 @@ classdef AllTests % Calling ice_timeout() should have no effect. % timeout.op(); % Ensure adapter is active. - to = TimeoutPrx.uncheckedCast(to.ice_timeout(1000 * mult)); + to = TimeoutPrx.uncheckedCast(to.ice_timeout(1000)); AllTests.connect(to); - timeout.holdAdapter(500 * mult); + timeout.holdAdapter(500); try to.sendData(seq); assert(false); @@ -273,15 +268,11 @@ classdef AllTests % Test Ice.Override.ConnectTimeout. % initData = app.cloneInitData(); - if mult == 1 - initData.properties_.setProperty('Ice.Override.ConnectTimeout', '250'); - else - initData.properties_.setProperty('Ice.Override.ConnectTimeout', '2500'); - end + initData.properties_.setProperty('Ice.Override.ConnectTimeout', '250'); comm = Ice.initialize(initData); to = TimeoutPrx.uncheckedCast(comm.stringToProxy(sref)); - timeout.holdAdapter(750 * mult); + timeout.holdAdapter(750); try to.op(); assert(false); @@ -293,8 +284,8 @@ classdef AllTests % Calling ice_timeout() should have no effect on the connect timeout. % timeout.op(); % Ensure adapter is active. - timeout.holdAdapter(750 * mult); - to = to.ice_timeout(1000 * mult); + timeout.holdAdapter(750); + to = to.ice_timeout(1000); try to.op(); assert(false); @@ -308,7 +299,7 @@ classdef AllTests timeout.op(); % Ensure adapter is active. to = to.ice_timeout(250); AllTests.connect(to); - timeout.holdAdapter(750 * mult); + timeout.holdAdapter(750); try to.sendData(seq); assert(false); diff --git a/matlab/test/Ice/timeout/Client.m b/matlab/test/Ice/timeout/client.m index 7a048c94043..88c03f842c8 100644 --- a/matlab/test/Ice/timeout/Client.m +++ b/matlab/test/Ice/timeout/client.m @@ -9,14 +9,14 @@ ICE_LICENSE file included in this distribution. ********************************************************************** %} -function Client(args) +function client(args) addpath('generated'); addpath('../../lib'); if ~libisloaded('ice') loadlibrary('ice', @iceproto) end - initData = TestApp.createInitData('Client', args); + initData = TestApp.createInitData('client', args); % % For this test, we want to disable retries. diff --git a/matlab/test/Ice/timeout/runTest.m b/matlab/test/Ice/timeout/runTest.m deleted file mode 100644 index 397a1e1b97b..00000000000 --- a/matlab/test/Ice/timeout/runTest.m +++ /dev/null @@ -1,9 +0,0 @@ -function runTest(varargin) - try - Client(varargin); - exit(0); - catch ex - disp(getReport(ex, 'extended')); - exit(1); - end -end diff --git a/matlab/test/lib/runTest.m b/matlab/test/lib/runTest.m new file mode 100644 index 00000000000..f96b91b2c0c --- /dev/null +++ b/matlab/test/lib/runTest.m @@ -0,0 +1,23 @@ +% +% This function runs a MATLAB test client. The first argument must the path name of the test directory. All +% other arguments are passed to the test client. +% +function runTest(varargin) + if length(varargin) == 0 + fprintf('testdir argument required\n'); + exit(1); + end + + testdir = varargin{1}; + varargin(1) = []; % Removes first argument. + + cd(testdir); + + try + client(varargin); + exit(0); + catch ex + disp(getReport(ex, 'extended')); + exit(1); + end +end diff --git a/scripts/Util.py b/scripts/Util.py index c960ab51c32..8cae7867967 100644 --- a/scripts/Util.py +++ b/scripts/Util.py @@ -3305,10 +3305,11 @@ class MatlabMapping(CppBasedClientMapping): def getCommandLineWithArgs(self, current, process, exe, args): dir = self.getTestCwd(process, current) - return "matlab -nodesktop -nosplash -wait -log -minimize -r \"cd '" + dir + "';runTest" + " " + args + "\"" + scriptdir = os.path.join(os.path.dirname(__file__), "..", "matlab", "test", "lib"); + return "matlab -nodesktop -nosplash -wait -log -minimize -r \"cd '" + scriptdir + "';runTest " + dir + " " + args + "\"" def getDefaultSource(self, processType): - return { "client" : "runTest.m" }[processType] + return { "client" : "client.m" }[processType] class JavaScriptMapping(Mapping): |