kkrull / cob_spec Goto Github PK
View Code? Open in Web Editor NEWThis project forked from 8thlight/cob_spec
A fitnesse suite for a web server
This project forked from 8thlight/cob_spec
A fitnesse suite for a web server
I have confirmed that gohttp
is - in fact - handling requests concurrently, through use of simultaneous,
long-running netcat connections. Spawning a goroutine to handle each request made it possible to connect with a
second netcat instance, while the first was still connected.
I am, however, having difficulty getting the TimeToComplete
spec to run on Go 1.10 / OSX High Sierra in what appears
to be the intended fashion - with 4096 concurrent requests. The spec is currently implemented in such manner as to
spawn 4096 threads all at once, and I don't see a way to get that to work on High Sierra.
When running it through the web page, the error looks like this:
__EXCEPTION__:java.lang.OutOfMemoryError: unable to create new native thread
at java.lang.Thread.start0(Native Method)
at java.lang.Thread.start(Thread.java:717)
at java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:957)
at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1367)
at java.util.concurrent.AbstractExecutorService.invokeAll(AbstractExecutorService.java:238)
at SimultaneousHttpBrowsers.execute(SimultaneousHttpBrowsers.java:42)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at fitnesse.slim.fixtureInteraction.DefaultInteraction.methodInvoke(DefaultInteraction.java:16)
at fitnesse.slim.MethodExecutor.callMethod(MethodExecutor.java:43)
at fitnesse.slim.MethodExecutor.invokeMethod(MethodExecutor.java:30)
at fitnesse.slim.MethodExecutor.findAndInvoke(MethodExecutor.java:52)
at fitnesse.slim.FixtureMethodExecutor.execute(FixtureMethodExecutor.java:18)
at fitnesse.slim.StatementExecutor.getMethodExecutionResult(StatementExecutor.java:218)
at fitnesse.slim.StatementExecutor.call(StatementExecutor.java:207)
at fitnesse.slim.Statement.callMethodAtIndex(Statement.java:104)
at fitnesse.slim.Statement.call(Statement.java:97)
at fitnesse.slim.Statement.execute(Statement.java:77)
at fitnesse.slim.ListExecutor$Executive.executeStatement(ListExecutor.java:44)
at fitnesse.slim.ListExecutor$Executive.executeStatements(ListExecutor.java:39)
at fitnesse.slim.ListExecutor.execute(ListExecutor.java:71)
at fitnesse.slim.SlimServer.executeInstructions(SlimServer.java:81)
at fitnesse.slim.SlimServer.processTheInstructions(SlimServer.java:73)
at fitnesse.slim.SlimServer.processOneSetOfInstructions(SlimServer.java:57)
at fitnesse.slim.SlimServer.tryProcessInstructions(SlimServer.java:43)
at fitnesse.slim.SlimServer.serve(SlimServer.java:30)
at fitnesse.slim.SlimService.accept(SlimService.java:98)
at fitnesse.slim.SlimService.startWithFactory(SlimService.java:39)
at fitnesse.slim.SlimService.main(SlimService.java:26)
If you run the test from the command line instead of from the web page, the error looks a little different:
F 10:42:39 R:0 W:1 I:0 E:2 TimeToComplete (HttpTestSuite.SimultaneousTestSuite.TimeToComplete) 0.001 seconds
. 10:42:39 R:0 W:0 I:0 E:0 SuiteTearDown (HttpTestSuite.SuiteTearDown) 0.001 seconds
Could not detect death of command line test runner.
java.lang.IllegalThreadStateException: process hasn't exited
at java.lang.UNIXProcess.exitValue(UNIXProcess.java:423)
at fitnesse.components.CommandRunner.join(CommandRunner.java:79)
at fitnesse.responders.run.slimResponder.SlimTestSystem.bye(SlimTestSystem.java:208)
at fitnesse.responders.run.MultipleTestsRunner.startTestSystemAndExecutePages(MultipleTestsRunner.java:118)
at fitnesse.responders.run.MultipleTestsRunner.internalExecuteTestPages(MultipleTestsRunner.java:88)
at fitnesse.responders.run.MultipleTestsRunner.executeTestPages(MultipleTestsRunner.java:60)
at fitnesse.responders.run.SuiteResponder.performExecution(SuiteResponder.java:57)
at fitnesse.responders.run.TestResponder.doExecuteTests(TestResponder.java:72)
at fitnesse.responders.run.TestResponder.doSending(TestResponder.java:63)
at fitnesse.responders.ChunkingResponder.startSending(ChunkingResponder.java:66)
at fitnesse.http.ChunkedResponse.sendTo(ChunkedResponse.java:26)
at fitnesse.http.MockResponseSender$OutputStreamSender.doSending(MockResponseSender.java:57)
at fitnesse.FitNesse.executeSingleCommand(FitNesse.java:106)
at fitnesseMain.FitNesseMain.executeSingleCommand(FitNesseMain.java:74)
at fitnesseMain.FitNesseMain.runFitNesse(FitNesseMain.java:64)
at fitnesseMain.FitNesseMain.updateAndLaunch(FitNesseMain.java:55)
at fitnesseMain.FitNesseMain.launchFitNesse(FitNesseMain.java:43)
at fitnesseMain.FitNesseMain.main(FitNesseMain.java:27)
It's trying to create 4096 native threads at once and send them off and running, and that's weird in and of itself on a machine with the capability
to run no more than a dozen threads at a time. A solution that is less dependent upon the capabilities and configuration of the host system
would involve creating one Task
per request and using a fixed thread pool to issue them concurrently.
As a workaround, I tried the following approaches:
-Xmx512m
) and decreasing the thread stack size (-Xss512k
), with no change in results.ulimit -u 4096
, but the maximum value allowed is somewhere around 2,000.ulimit -s 512
, with no change in results.ab -c 8 -n 4096 'http://127.0.0.1:5000/'
, which
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.