11cb0ef41Sopenharmony_ci'use strict'; 21cb0ef41Sopenharmony_ci 31cb0ef41Sopenharmony_ci// Test that DEP0121 is emitted only once if _setSimultaneousAccepts() is called 41cb0ef41Sopenharmony_ci// more than once. This test is similar to 51cb0ef41Sopenharmony_ci// test-net-deprecated-setsimultaneousaccepts.js, but that test calls 61cb0ef41Sopenharmony_ci// _setSimultaneousAccepts() only once. Unlike this test, that will confirm 71cb0ef41Sopenharmony_ci// that the warning is emitted on the first call. This test doesn't check which 81cb0ef41Sopenharmony_ci// call caused the warning to be emitted. 91cb0ef41Sopenharmony_ci 101cb0ef41Sopenharmony_ciconst { expectWarning } = require('../common'); 111cb0ef41Sopenharmony_ciconst { _setSimultaneousAccepts } = require('net'); 121cb0ef41Sopenharmony_ci 131cb0ef41Sopenharmony_ciexpectWarning( 141cb0ef41Sopenharmony_ci 'DeprecationWarning', 151cb0ef41Sopenharmony_ci 'net._setSimultaneousAccepts() is deprecated and will be removed.', 161cb0ef41Sopenharmony_ci 'DEP0121'); 171cb0ef41Sopenharmony_ci 181cb0ef41Sopenharmony_ci_setSimultaneousAccepts(); 191cb0ef41Sopenharmony_ci_setSimultaneousAccepts(); 20