Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for ReleasingPortAllocator (0.2 sec)

  1. subprojects/core/src/testFixtures/groovy/org/gradle/util/ports/ReleasingPortAllocator.groovy

    /**
     * A TestRule that releases any assigned ports after the test executes.
     */
    class ReleasingPortAllocator implements PortAllocator, TestRule {
        final PortAllocator delegate
        List<Integer> portsAllocated = new ArrayList<>()
    
        ReleasingPortAllocator() {
            this(FixedAvailablePortAllocator.getInstance())
        }
    
        ReleasingPortAllocator(PortAllocator delegate) {
            this.delegate = delegate
        }
    
        @Override
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Dec 11 13:37:56 UTC 2023
    - 1.8K bytes
    - Viewed (0)
  2. platforms/documentation/samples/src/integTest/groovy/org/gradle/integtests/samples/SamplesWebProjectIntegrationTest.groovy

    import org.gradle.test.fixtures.file.TestFile
    import org.gradle.util.ports.ReleasingPortAllocator
    import org.junit.Rule
    
    class SamplesWebProjectIntegrationTest extends AbstractIntegrationSpec {
        @Rule public final Sample sample = new Sample(temporaryFolder, 'webApplication/customized/groovy')
        @Rule ReleasingPortAllocator portAllocator = new ReleasingPortAllocator()
    
        def setup() {
            executer.withRepositoryMirrors()
        }
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Nov 27 17:53:42 UTC 2023
    - 1.7K bytes
    - Viewed (0)
  3. platforms/documentation/samples/src/integTest/groovy/org/gradle/integtests/samples/SamplesWebQuickstartIntegrationTest.groovy

    import org.gradle.test.fixtures.file.TestFile
    import org.gradle.util.ports.ReleasingPortAllocator
    import org.junit.Rule
    
    class SamplesWebQuickstartIntegrationTest extends AbstractIntegrationSpec {
        @Rule public final Sample sample = new Sample(temporaryFolder, 'webApplication/quickstart/groovy')
        @Rule ReleasingPortAllocator portFinder = new ReleasingPortAllocator()
    
        def setup() {
            executer.withRepositoryMirrors()
        }
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Nov 27 17:53:42 UTC 2023
    - 1.8K bytes
    - Viewed (0)
  4. platforms/core-runtime/messaging/src/test/groovy/org/gradle/internal/remote/internal/inet/TcpConnectorTest.groovy

        final def outgoingConnector = new TcpOutgoingConnector()
        final def incomingConnector = new TcpIncomingConnector(executorFactory, addressFactory, idGenerator)
        @Rule
        public ReleasingPortAllocator portAllocator = new ReleasingPortAllocator()
    
        def "client can connect to server"() {
            Action action = Mock()
    
            when:
            def acceptor = incomingConnector.accept(action, false)
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 08:59:22 UTC 2023
    - 10.4K bytes
    - Viewed (0)
  5. subprojects/core/src/test/groovy/org/gradle/util/ports/ReleasingPortAllocatorTest.groovy

    
    class ReleasingPortAllocatorTest extends Specification {
        def "releases ports after a test"() {
            PortAllocator delegate = Mock(PortAllocator)
            PortAllocator portAllocator = new ReleasingPortAllocator(delegate)
            Statement base = Mock(Statement)
            Description description = Mock(Description)
            def statement = portAllocator.apply(base, description)
    
            when:
            statement.evaluate()
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Sep 08 19:04:13 UTC 2015
    - 1.4K bytes
    - Viewed (0)
Back to top