|The Network Suite functionality is deprecated. We don’t recommend using it for distributed testing. Consider using a CI/CD system for managing distributed tests. See Migrating Distributed Tests to CI/CD Systems for details. In case you need to run web tests on multiple environments in parallel, you can also try using your project’s Execution Plan.|
LeaveCriticalSection makes the current project leave a critical section making it possible for other projects to access this critical section.
The method is applied to the following object:
The method has the following parameter:
Specifies the name of the needed critical section (case-insensitive).
To request access to a critical section, use the
The following script halts the network suite's execution if the script doesn't get access to the CS1 critical section within the specified period.
if NetworkSuite.EnterCriticalSection("CS1", 600000): # ... NetworkSuite.LeaveCriticalSection("CS1") else: NetworkSuite.Stop()