blob: 4601c524bc2ba71271508ca8d4f7bc352d59fe77 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
# -*- coding: utf-8 -*-
# **********************************************************************
#
# Copyright (c) 2003-present ZeroC, Inc. All rights reserved.
#
# **********************************************************************
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))])
|