netty5/common/src/test/java/io/netty/util
Robert Mihaly d7bb05b1ac Ensure scheduled tasks are executed before shutdown (#9858)
Motivation:

In #9603 the executor hung on shutdown because of an abandoned task
on another executor the first was waiting for.

Modifications:

This commit modifies the executor shutdown sequence to include
switching to SHUTDOWN state and then running all remaining tasks.
This ensures that no more tasks are scheduled after SHUTDOWN and
the last pass of running remaining tasks will take it all.
Any tasks scheduled after SHUTDOWN will be rejected.

This change preserves the functionality of graceful shutdown with
quiet period and only adds one more pass of task execution after
the default shutdown process has finished and the executor is
ready for termination.

Result:

After this change tasks that succeed to be added to the executor will
be always executed. Tasks which come late will be rejected instead of
abandoned.
2019-12-11 11:33:59 +01:00
..
concurrent Ensure scheduled tasks are executed before shutdown (#9858) 2019-12-11 11:33:59 +01:00
internal Fix HttpContentEncoder does not handle multiple Accept-Encoding (#9557) 2019-09-11 08:50:43 +02:00
AbstractReferenceCountedTest.java migrate java8: use lambda and method reference (#8781) 2019-01-29 14:06:05 +01:00
AsciiStringCharacterTest.java AsciiString contentEqualsIgnoreCase fails when arrayOffset is non-zero (#9477) 2019-08-17 09:57:40 +02:00
AsciiStringMemoryTest.java Java 8 migration: Use diamond operator (#8749) 2019-01-22 16:07:26 +01:00
AttributeKeyTest.java Allow to get existing ChannelOption / AttributeKey from String 2015-02-18 09:29:37 +01:00
ConstantPoolTest.java migrate java8: use lambda and method reference (#8781) 2019-01-29 14:06:05 +01:00
DefaultAttributeMapTest.java Fix misordered 'assertEquals' arguments in tests 2017-03-08 22:48:37 -08:00
DomainNameMappingTest.java Java 8 migration: Use diamond operator (#8749) 2019-01-22 16:07:26 +01:00
HashedWheelTimerTest.java migrate java8: use lambda and method reference (#8781) 2019-01-29 14:06:05 +01:00
NettyRuntimeTests.java migrate java8: use lambda and method reference (#8781) 2019-01-29 14:06:05 +01:00
NetUtilTest.java Move methods for decode hex dump into StringUtil 2017-06-23 18:52:42 +02:00
RecyclerTest.java Use interval instead of mask comparison for Recycler ratio (#9748) 2019-11-05 15:21:09 +01:00
ResourceLeakDetectorTest.java Java 8 migration: Use diamond operator (#8749) 2019-01-22 16:07:26 +01:00
ThreadDeathWatcherTest.java migrate java8: use lambda and method reference (#8781) 2019-01-29 14:06:05 +01:00