Build #2,624

Build: #2624 failed Changes by Simon Basle

Build result summary


5 minutes
07e0be7ab09590dde393f8b5520ad0ae55be19ed 07e0be7ab09590dde393f8b5520ad0ae55be19ed
Total tests
Fixed in
#2625 (Manual run by Simon Basle)



Code commits

Author Commit Message Commit date
Simon Basle Simon Basle 07e0be7ab09590dde393f8b5520ad0ae55be19ed 07e0be7ab09590dde393f8b5520ad0ae55be19ed fix #1804 Add a Scheduler that caps number of threads and scales to 0
The new `BoundedElasticSchedule` is similar to `ElasticScheduler` but
doesn't allow unbounded growth of the number of threads. It can be
configured with two limits: the thread count and a task queue limit.

Once the thread count has been reached, the Scheduler ceases providing
thread-backed Workers when requested with one. Instead it offers a
Worker facade that will enqueue task submissions and replay them
whenever a thread is freed up later. This ensures no extra threads are
created while letting code transparently continue submitting tasks.

Such tasks will be _scheduled_ when a backing thread becomes available,
which makes it as if the scheduling methods had really been called at
that point in time.

The second (optional) limit is on the global number of such deferred
task submissions. This limit is shared among all facade workers of a
given scheduler instance, as well as direct submissions that occur on
that instance when there is no capacity for more threads.
When the task limit is hit, new task submissions are rejected with a

The singleton `Schedulers.newBoundedElastic()` has a thread limit
equal to 10 times the number of CPU cores, and no limit on the number
of deferred task submissions.


New test failures 1
Status Test View job Duration
Collapse Failed FluxPublishOnTest scanSubscriber History
Core < 1 sec
org.junit.ComparisonFailure: org.junit.ComparisonFailure: expected:<[2]> but was:<[1]>
org.junit.ComparisonFailure: expected:<[2]> but was:<[1]>
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(
	at reactor.core.publisher.FluxPublishOnTest.scanSubscriber(
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(
(47 more lines...)