1'use strict';
2
3// Test that DEP0121 is emitted only once if _setSimultaneousAccepts() is called
4// more than once. This test is similar to
5// test-net-deprecated-setsimultaneousaccepts.js, but that test calls
6// _setSimultaneousAccepts() only once. Unlike this test, that will confirm
7// that the warning is emitted on the first call. This test doesn't check which
8// call caused the warning to be emitted.
9
10const { expectWarning } = require('../common');
11const { _setSimultaneousAccepts } = require('net');
12
13expectWarning(
14  'DeprecationWarning',
15  'net._setSimultaneousAccepts() is deprecated and will be removed.',
16  'DEP0121');
17
18_setSimultaneousAccepts();
19_setSimultaneousAccepts();
20