summaryrefslogtreecommitdiff
path: root/matlab/test/Ice/timeout/Client.m
blob: fcdcdef26b8e6da69e4c8d00c247843328fe0a9a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
%{
**********************************************************************

Copyright (c) 2003-2017 ZeroC, Inc. All rights reserved.

This copy of Ice is licensed to you under the terms described in the
ICE_LICENSE file included in this distribution.

**********************************************************************
%}

classdef Client < Application
    methods
        function r = run(obj, args)
            timeout = AllTests.allTests(obj);
            timeout.shutdown();
            r = 0;
        end
    end
    methods(Access=protected)
        function [r, remArgs] = getInitData(obj, args)
            [initData, remArgs] = getInitData@Application(obj, args);
            initData.properties_.setProperty('Ice.Package.Test', 'test.Ice.timeout');

            %
            % For this test, we want to disable retries.
            %
            initData.properties_.setProperty('Ice.RetryIntervals', '-1');

            %
            % This test kills connections, so we don't want warnings.
            %
            initData.properties_.setProperty('Ice.Warn.Connections', '0');

            %
            % Limit the send buffer size, this test relies on the socket
            % send() blocking after sending a given amount of data.
            %
            initData.properties_.setProperty('Ice.TCP.SndSize', '50000');

            r = initData;
        end
    end
    methods(Static)
        function status = start(args)
            addpath('generated');
            if ~libisloaded('icematlab')
                loadlibrary('icematlab')
            end
            c = Client();
            status = c.main('Client', args);
        end
    end
end