GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Fix flaky AbstractSingleThreadEventLoopTest (#16352) · netty/netty@0bbe495

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • testsuite/src/main/java/io/netty/testsuite/transport
    • AbstractSingleThreadEventLoopTest.java
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎testsuite/src/main/java/io/netty/testsuite/transport/AbstractSingleThreadEventLoopTest.java‎

Copy file name to clipboardExpand all lines: testsuite/src/main/java/io/netty/testsuite/transport/AbstractSingleThreadEventLoopTest.java
+9-5Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -373,14 +373,18 @@ public void testSubmittingTaskWakesUpSuspendedExecutor() throws Exception {
373373
assertNotNull(suspendedLoop, "Could not find a suspended executor to test.");
374374

375375
// Submit a task directly to the suspended loop, this should trigger the wake-up mechanism.
376-
Future<?> future = suspendedLoop.submit(() -> { });
377-
future.syncUninterruptibly();
378-
379-
assertFalse(suspendedLoop.isSuspended(), "Executor should wake up after task submission.");
376+
int i = 0;
377+
boolean isSuspended;
378+
do {
379+
Future<?> future = suspendedLoop.submit(() -> { });
380+
future.sync();
381+
} while ((isSuspended = suspendedLoop.isSuspended()) && i++ < 10);
382+
383+
assertFalse(isSuspended, "Executor should wake up after task submission.");
380384
assertEquals(SCALING_MAX_THREADS, countActiveExecutors(group),
381385
"Active executor count should increase after wake-up.");
382386
} finally {
383-
group.shutdownGracefully().syncUninterruptibly();
387+
group.shutdownGracefully().sync();
384388
}
385389
}
386390

0 commit comments

Comments
0 (0)
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.