Skip to content

Conversation

@hanmz
Copy link
Contributor

@hanmz hanmz commented Nov 20, 2025

Motivation

When executing this test case in a 16C32G Linux environment, the following error will be encountered. The problem is that Jetty requires more than 4 threads. Therefore, we cannot configure it to 4 here; instead, we must use the default value Math.max(8, 2 * Runtime.getRuntime().availableProcessors())

Clipboard_Screenshot_1763638875

Modifications

Use the default values ​​configured for numHttpServerThreads.

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Nov 20, 2025
@hanmz hanmz requested review from Jason918 and wolfstudy November 20, 2025 11:47
@hanmz hanmz assigned hanmz and unassigned Jason918 and wolfstudy Nov 20, 2025
@hanmz hanmz added this to the 4.2.0 milestone Nov 20, 2025
@hanmz hanmz requested review from lhotari and merlimat November 20, 2025 11:49
@Technoboy- Technoboy- closed this Nov 21, 2025
@Technoboy- Technoboy- reopened this Nov 21, 2025
Copy link
Member

@lhotari lhotari left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Therefore, we cannot configure it to 4 here; instead, we must use the default value Math.max(8, 2 * Runtime.getRuntime().availableProcessors())

One of the goals in setting the value is to use minimal amount of threads. Removing of the value would set the value to 64 on a 32 core machine like yours. That seems a lot for testing.
Have you checked what the minimal value is?

We could consider passing -XX:ActiveProcessorCount=4 to the test JVM args to address test behavior differences across environments. The reason why that would make sense is that the tests would behave closer to how they behave in GitHub Actions based CI (GitHub Actions VM specs) when the number of threads are similar across environments.

By default, the Pulsar maven build has the setting testForkCount=4 which will run tests in 4 JVMs in parallel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/test doc-not-needed Your PR changes do not impact docs ready-to-test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants