Skip to content

Jetty web server in test cases fails to start on my computer #462

Description

@RuralHunter

It googled around and found it might be related to the core number of my CPU. But anyway all the tests using Jetty web server fails with this exception:

java.lang.IllegalStateException: Insufficient configured threads: required=5 < max=5 for QueuedThreadPool[qtp1712943792]@661972b0{STARTED,2<=2<=5,i=2,r=-1,q=0}[ReservedThreadExecutor@1a245833{reserved=0/1,pending=0}]
	at org.eclipse.jetty.util.thread.ThreadPoolBudget.check(ThreadPoolBudget.java:165)
	at org.eclipse.jetty.util.thread.ThreadPoolBudget.leaseTo(ThreadPoolBudget.java:141)
	at org.eclipse.jetty.util.thread.ThreadPoolBudget.leaseFrom(ThreadPoolBudget.java:191)
	at org.eclipse.jetty.io.SelectorManager.doStart(SelectorManager.java:255)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:110)
	at org.eclipse.jetty.server.AbstractConnector.doStart(AbstractConnector.java:323)
	at org.eclipse.jetty.server.AbstractNetworkConnector.doStart(AbstractNetworkConnector.java:81)
	at org.eclipse.jetty.server.ServerConnector.doStart(ServerConnector.java:234)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73)
	at org.eclipse.jetty.server.Server.doStart(Server.java:401)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73)
	at com.gargoylesoftware.htmlunit.WebServerTestCase.tryStart(WebServerTestCase.java:392)
	at com.gargoylesoftware.htmlunit.WebDriverTestCase.startWebServer(WebDriverTestCase.java:653)
	at com.gargoylesoftware.htmlunit.WebDriverTestCase.loadPage2(WebDriverTestCase.java:941)
	at com.gargoylesoftware.htmlunit.WebDriverTestCase.loadPage2(WebDriverTestCase.java:902)
	at com.gargoylesoftware.htmlunit.WebDriverTestCase.loadPage2(WebDriverTestCase.java:891)
	at com.gargoylesoftware.htmlunit.javascript.host.xml.XMLHttpRequestTest.asyncIsDefault(XMLHttpRequestTest.java:301)

I increased the maxThreads parameter from 5 to 10 in this line and the error is gone.

No activity

Activity on this issue will appear here.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions