Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 91 - 100 of 1,000 for sock (0.03 seconds)

  1. guava-tests/test/com/google/common/util/concurrent/StripedTest.java

            .add(new Striped.SmallLazyStriped<Lock>(50, ReentrantLock::new))
            .add(new Striped.SmallLazyStriped<Lock>(64, ReentrantLock::new))
            .add(new Striped.LargeLazyStriped<Lock>(50, ReentrantLock::new))
            .add(new Striped.LargeLazyStriped<Lock>(64, ReentrantLock::new))
            .add(new Striped.SmallLazyStriped<Semaphore>(50, SEMAPHORE_SUPPLER))
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 22:45:21 GMT 2026
    - 8.1K bytes
    - Click Count (0)
  2. src/test/java/jcifs/internal/CommonServerMessageBlockResponseTest.java

     */
    class CommonServerMessageBlockResponseTest {
    
        @Mock
        private CommonServerMessageBlockResponse response;
    
        @Mock
        private CommonServerMessageBlockResponse nextResponse;
    
        @Mock
        private CommonServerMessageBlockRequest request;
    
        @Mock
        private SMBSigningDigest digest;
    
        @BeforeEach
        void setUp() {
            MockitoAnnotations.openMocks(this);
        }
    
        @Test
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 20.3K bytes
    - Click Count (0)
  3. build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/util/ports/ReservedPortRange.java

         */
        int allocate() {
            try {
                lock.lock();
                return getAvailablePort();
            } finally {
                lock.unlock();
            }
        }
    
        /**
         * Deallocate the given port
         *
         * @param port The port to deallocate
         */
        public void deallocate(int port) {
            try {
                lock.lock();
                allocated.remove(Integer.valueOf(port));
    Created: Wed Apr 08 16:19:15 GMT 2026
    - Last Modified: Tue Jun 01 09:19:30 GMT 2021
    - 2.8K bytes
    - Click Count (0)
  4. src/test/java/jcifs/smb/SmbPipeInputStreamTest.java

    import jcifs.internal.smb2.ioctl.SrvPipePeekResponse;
    
    @ExtendWith(MockitoExtension.class)
    class SmbPipeInputStreamTest {
    
        @Mock
        SmbPipeHandleImpl handle;
        @Mock
        SmbNamedPipe pipe;
        @Mock
        SmbTreeHandleImpl tree;
        @Mock
        SmbFileHandleImpl fd;
        @Mock
        Configuration config;
    
        private SmbPipeInputStream newStreamWithInit(boolean smb2) throws CIFSException {
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 9.9K bytes
    - Click Count (0)
  5. cmd/site-replication-metrics.go

    	Endpoint string `json:"-"`
    	// Secure is true if the replication target endpoint is secure
    	Secure bool `json:"-"`
    }
    
    func (sr *SRStats) update(st replStat, dID string) {
    	sr.lock.Lock()
    	defer sr.lock.Unlock()
    	srs, ok := sr.M[dID]
    	if !ok {
    		srs = &SRStatus{
    			XferRateLrg: newXferStats(),
    			XferRateSml: newXferStats(),
    		}
    	}
    	srs.Endpoint = st.Endpoint
    	srs.Secure = st.Secure
    Created: Sun Apr 05 19:28:12 GMT 2026
    - Last Modified: Fri Aug 29 02:39:48 GMT 2025
    - 8.2K bytes
    - Click Count (0)
  6. cmd/namespace-lock_test.go

    	}
    }
    
    // Test lock race
    func TestNSLockRace(t *testing.T) {
    	t.Skip("long test skip it")
    
    	ctx := t.Context()
    
    	for i := range 10000 {
    		nsLk := newNSLock(false)
    
    		// lk1; ref=1
    		if !nsLk.lock(ctx, "volume", "path", "source", "opsID", false, time.Second) {
    			t.Fatal("failed to acquire lock")
    		}
    
    		// lk2
    		lk2ch := make(chan struct{})
    		go func() {
    Created: Sun Apr 05 19:28:12 GMT 2026
    - Last Modified: Fri Aug 29 02:39:48 GMT 2025
    - 3K bytes
    - Click Count (0)
  7. src/test/java/jcifs/smb1/smb1/SmbConstantsTest.java

         */
        @Test
        @DisplayName("Mock interaction example with SmbTransport")
        void mockTransportInteraction() {
            // Create a mock of SmbTransport from jcifs package
            jcifs.SmbTransport mock = mock(jcifs.SmbTransport.class);
            // Stub the getRemoteHostName method
            when(mock.getRemoteHostName()).thenReturn("test-host");
            // Verify the stubbing
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 4.2K bytes
    - Click Count (0)
  8. src/test/java/jcifs/internal/witness/MockWitnessService.java

            serverThread = new Thread(this::runServer, "MockWitnessService");
            serverThread.setDaemon(true);
            serverThread.start();
    
            log.info("Mock witness service started on port {}", serverSocket.getLocalPort());
        }
    
        /**
         * Stop the mock witness service
         */
        public void stop() {
            running.set(false);
    
            if (serverSocket != null && !serverSocket.isClosed()) {
                try {
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Sat Aug 23 09:06:40 GMT 2025
    - 8.2K bytes
    - Click Count (0)
  9. compat/maven-embedder/src/test/java/org/apache/maven/cli/event/ExecutionEventLoggerTest.java

        }
    
        @Test
        void testTerminalWidth() {
            // prepare
            Logger logger = mock(Logger.class);
            when(logger.isInfoEnabled()).thenReturn(true);
    
            ExecutionEvent event = mock(ExecutionEvent.class);
            MavenProject project = mock(MavenProject.class);
            when(project.getGroupId()).thenReturn("org.apache.maven.plugins.overflow");
    Created: Sun Apr 05 03:35:12 GMT 2026
    - Last Modified: Sun Dec 01 19:41:22 GMT 2024
    - 12.3K bytes
    - Click Count (0)
  10. guava-tests/test/com/google/common/util/concurrent/MoreExecutorsTest.java

      }
    
      @AndroidIncompatible // Mocking ExecutorService is forbidden there. TODO(b/218700094): Don't mock.
      public void testGetExitingExecutorService_executorDelegatesToOriginal() {
        TestApplication application = new TestApplication();
        ThreadPoolExecutor executor = mock(ThreadPoolExecutor.class);
        ThreadFactory threadFactory = mock(ThreadFactory.class);
        when(executor.getThreadFactory()).thenReturn(threadFactory);
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 22:45:21 GMT 2026
    - 26.1K bytes
    - Click Count (0)
Back to Top