Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 42 for simulate (0.17 sec)

  1. src/test/java/org/codelibs/fess/mylasta/direction/sponsor/FessCurtainFinallyHookTest.java

            // Create a hook that simulates an exception scenario
            AtomicBoolean exceptionHandled = new AtomicBoolean(false);
    
            FessCurtainFinallyHook customHook = new FessCurtainFinallyHook() {
                @Override
                public void hook(final FwAssistantDirector assistantDirector) {
                    try {
                        // Simulate a scenario where the method exists but invocation fails
    Registered: Thu Sep 04 12:52:25 UTC 2025
    - Last Modified: Tue Aug 19 14:09:36 UTC 2025
    - 8.7K bytes
    - Viewed (0)
  2. src/test/java/org/codelibs/fess/job/UpdateLabelJobTest.java

        }
    
        // Test handling of processing exception
        public void test_execute_withProcessingException() {
            // Create a mock that returns 0 to simulate processing error
            SearchEngineClient errorClient = new SearchEngineClient() {
                @Override
                public long updateByQuery(String index,
    Registered: Thu Sep 04 12:52:25 UTC 2025
    - Last Modified: Tue Aug 19 14:09:36 UTC 2025
    - 9.4K bytes
    - Viewed (0)
  3. src/test/java/org/codelibs/fess/thumbnail/ThumbnailGeneratorTest.java

                    return false;
                }
    
                // Simulate thumbnail generation
                try {
                    if (!outputFile.exists()) {
                        outputFile.createNewFile();
                    }
                    // Write some dummy content to simulate actual thumbnail
                    Files.write(outputFile.toPath(), ("thumbnail-" + thumbnailId).getBytes());
    Registered: Thu Sep 04 12:52:25 UTC 2025
    - Last Modified: Tue Aug 19 14:09:36 UTC 2025
    - 11.4K bytes
    - Viewed (0)
  4. okhttp-testing-support/src/main/kotlin/okhttp3/internal/concurrent/TaskFaker.kt

          val sleepUntil = nanoTime + durationNanos
          yieldUntil { nanoTime >= sleepUntil }
        }
      }
    
      /**
       * Artificially stall until manually resumed by the test thread with [runTasks]. Use this to
       * simulate races in tasks that doesn't have a deterministic sequence.
       */
      fun yield() {
        taskRunner.assertLockNotHeld()
        taskRunner.withLock {
          yieldUntil()
        }
      }
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed May 28 23:28:25 UTC 2025
    - 11.9K bytes
    - Viewed (0)
  5. src/test/java/org/codelibs/fess/timer/MonitorTargetTest.java

            Exception exception = new Exception() {
                @Override
                public void printStackTrace(java.io.PrintWriter writer) {
                    // Simulate a normal stack trace output
                    writer.println("Special test exception");
                    writer.flush();
                }
            };
    
            monitorTarget.appendException(buf, exception);
    Registered: Thu Sep 04 12:52:25 UTC 2025
    - Last Modified: Tue Aug 19 14:09:36 UTC 2025
    - 11K bytes
    - Viewed (0)
  6. src/test/java/org/codelibs/fess/exec/CrawlerTest.java

                // We can't easily test the static process method directly without full container setup
                // So we'll test the Options behavior separately
                assertNull(options.sessionId);
    
                // Simulate what process() does - generate default sessionId
                if (options.sessionId == null) {
                    SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss");
    Registered: Thu Sep 04 12:52:25 UTC 2025
    - Last Modified: Tue Aug 19 14:09:36 UTC 2025
    - 30.5K bytes
    - Viewed (0)
  7. src/test/java/org/codelibs/fess/ds/DataStoreTest.java

            dataStore = new DataStore() {
                @Override
                public void store(DataConfig config, IndexUpdateCallback callback, DataStoreParams initParamMap) {
                    // Simulate storing documents
                    Map<String, Object> doc1 = new HashMap<>();
                    doc1.put("id", "1");
                    doc1.put("title", "Document 1");
                    callback.store(initParamMap, doc1);
    
    Registered: Thu Sep 04 12:52:25 UTC 2025
    - Last Modified: Tue Aug 19 14:09:36 UTC 2025
    - 13K bytes
    - Viewed (0)
  8. okhttp/src/jvmTest/kotlin/okhttp3/ConnectionCoalescingTest.kt

        // Simulate a stale connection in the pool.
        connection.get()!!.socket().close()
        val sanUrl = url.newBuilder().host("san.com").build()
        assert200Http2Response(execute(sanUrl), "san.com")
        assertThat(client.connectionPool.connectionCount()).isEqualTo(1)
      }
    
      /**
       * This is an extraordinary test case. Here's what it's trying to simulate.
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu Jun 19 11:44:16 UTC 2025
    - 19.1K bytes
    - Viewed (0)
  9. src/test/java/org/codelibs/fess/thumbnail/ThumbnailManagerTest.java

            // Test empty directory deletion logic
            File emptyDir = new File(tempDir, "empty");
            emptyDir.mkdirs();
            assertTrue(emptyDir.exists());
    
            // Simulate the behavior of postVisitDirectory - delete empty directories
            if (emptyDir.isDirectory() && emptyDir.list().length == 0) {
                emptyDir.delete();
            }
    
            assertFalse(emptyDir.exists());
    Registered: Thu Sep 04 12:52:25 UTC 2025
    - Last Modified: Tue Aug 19 14:09:36 UTC 2025
    - 18.7K bytes
    - Viewed (0)
  10. src/test/java/org/codelibs/fess/ds/callback/IndexUpdateCallbackTest.java

                private long totalTime = 0;
    
                @Override
                public void store(DataStoreParams paramMap, Map<String, Object> dataMap) {
                    try {
                        Thread.sleep(10); // Simulate processing time
                    } catch (InterruptedException e) {
                        // Ignore
                    }
                    totalTime = System.currentTimeMillis() - startTime;
                }
    
    Registered: Thu Sep 04 12:52:25 UTC 2025
    - Last Modified: Tue Aug 19 14:09:36 UTC 2025
    - 12.4K bytes
    - Viewed (0)
Back to top