summaryrefslogtreecommitdiff
path: root/scripts/tests/Ice/binding.py
blob: 2fdda431ac3143de8aae59092c72eafb8009311f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# -*- coding: utf-8 -*-
# **********************************************************************
#
# Copyright (c) 2003-present 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.
#
# **********************************************************************

def setlimits():
    if not isinstance(platform, Windows):
        #
        # Set a low limit for the number of available file descriptors. This is needed for the max FD test
        # which could otherwise potentially allocate many file descriptors on the system.
        #
        import resource
        resource.setrlimit(resource.RLIMIT_NOFILE, (92, 92))

TestSuite(__name__, [ClientServerTestCase(server=Server(preexec_fn=setlimits))])