j8th / jhttpsrv Goto Github PK
View Code? Open in Web Editor NEWA small http server written in Java.
A small http server written in Java.
I got a failure when I ran the tests for the server the first time. I ran it a second time and it worked without failure. I was able to reproduce the error by doing gradle clean
and then running the specs.
$ gradle test --info
Starting Build
Settings evaluated using settings file '/Users/sandropadin/code/j8th/jhttpsrv/settings.gradle'.
Projects loaded. Root project using build file '/Users/sandropadin/code/j8th/jhttpsrv/build.gradle'.
Included projects: [root project 'jhttpsrv']
Evaluating root project 'jhttpsrv' using build file '/Users/sandropadin/code/j8th/jhttpsrv/build.gradle'.
All projects evaluated.
Selected primary task 'test' from project :
Tasks to be executed: [task ':compileJava', task ':processResources', task ':classes', task ':compileTestJava', task ':processTestResources', task ':testClasses', task ':test']
:compileJava (Thread[main,5,main]) started.
:compileJava
Executing task ':compileJava' (up-to-date check took 0.085 secs) due to:
Input file /Users/sandropadin/code/j8th/jhttpsrv/src/main/java/com/eighthlight/jhttpsrv/handler/FileRequestHandler.java has changed.
Input file /Users/sandropadin/code/j8th/jhttpsrv/src/main/java/com/eighthlight/jhttpsrv/handler/TimeRequestHandler.java has changed.
Input file /Users/sandropadin/code/j8th/jhttpsrv/src/main/java/com/eighthlight/jhttpsrv/response/ResponseBody.java has changed.
Compiling with JDK Java compiler API.
:compileJava (Thread[main,5,main]) completed. Took 0.955 secs.
:processResources (Thread[main,5,main]) started.
:processResources
Skipping task ':processResources' as it has no source files.
:processResources UP-TO-DATE
:processResources (Thread[main,5,main]) completed. Took 0.002 secs.
:classes (Thread[main,5,main]) started.
:classes
Skipping task ':classes' as it has no actions.
:classes (Thread[main,5,main]) completed. Took 0.001 secs.
:compileTestJava (Thread[main,5,main]) started.
:compileTestJava
Download https://repo1.maven.org/maven2/org/mockito/mockito-core/1.10.19/mockito-core-1.10.19.pom
Found locally available resource with matching checksum: [https://jcenter.bintray.com/org/mockito/mockito-core/1.10.19/mockito-core-1.10.19.pom, /Users/sandropadin/.gradle/caches/modules-2/files-2.1/org.mockito/mockito-core/1.10.19/228d760941af5e4c6e772d8761794aefe555da22/mockito-core-1.10.19.pom]
Download https://repo1.maven.org/maven2/org/mockito/mockito-core/1.10.19/mockito-core-1.10.19.jar
Executing task ':compileTestJava' (up-to-date check took 2.045 secs) due to:
Input file /Users/sandropadin/code/j8th/jhttpsrv/src/test/java/com/eighthlight/jhttpsrv/testmessage/chrome/TestRequestMaker.java has changed.
Input file /Users/sandropadin/code/j8th/jhttpsrv/build/classes/main/com/eighthlight/jhttpsrv/constants/StatusCodes.class has been added.
Input file /Users/sandropadin/code/j8th/jhttpsrv/src/test/java/com/eighthlight/jhttpsrv/router/RouterTest.java has changed.
Compiling with JDK Java compiler API.
Note: /Users/sandropadin/code/j8th/jhttpsrv/src/test/java/com/eighthlight/jhttpsrv/request/RequestHeaderTest.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
:compileTestJava (Thread[main,5,main]) completed. Took 2.309 secs.
:processTestResources (Thread[main,5,main]) started.
:processTestResources
Skipping task ':processTestResources' as it has no source files.
:processTestResources UP-TO-DATE
:processTestResources (Thread[main,5,main]) completed. Took 0.001 secs.
:testClasses (Thread[main,5,main]) started.
:testClasses
Skipping task ':testClasses' as it has no actions.
:testClasses (Thread[main,5,main]) completed. Took 0.001 secs.
:test (Thread[main,5,main]) started.
:test
Executing task ':test' (up-to-date check took 0.067 secs) due to:
Value of input property 'candidateClassFiles' has changed for task ':test'
Starting process 'Gradle Test Executor 1'. Working directory: /Users/sandropadin/code/j8th/jhttpsrv Command: /Library/Java/JavaVirtualMachines/jdk1.8.0_11.jdk/Contents/Home/bin/java -Djava.security.manager=jarjar.org.gradle.process.internal.child.BootstrapSecurityManager -Dfile.encoding=UTF-8 -Duser.country=US -Duser.language=en -Duser.variant -ea -cp /Users/sandropadin/.gradle/caches/2.2.1/workerMain/gradle-worker.jar jarjar.org.gradle.process.internal.launcher.GradleWorkerMain 'Gradle Test Executor 1'
Successfully started process 'Gradle Test Executor 1'
Gradle Test Executor 1 started executing tests.
com.eighthlight.jhttpsrv.server.JhttpsrvTest > testRun STANDARD_ERROR
Exception in thread "Thread-4" java.lang.NullPointerException
com.eighthlight.jhttpsrv.util.StringUtilsTest STANDARD_ERROR
at com.eighthlight.jhttpsrv.worker.Worker.run(Worker.java:30)
at com.eighthlight.jhttpsrv.server.Jhttpsrv.run(Jhttpsrv.java:34)
at java.lang.Thread.run(Thread.java:745)
Gradle Test Executor 1 finished executing tests.
Finished generating test XML results (0.01 secs) into: /Users/sandropadin/code/j8th/jhttpsrv/build/test-results
Generating HTML test report...
Finished generating test html results (0.058 secs) into: /Users/sandropadin/code/j8th/jhttpsrv/build/reports/tests
:test (Thread[main,5,main]) completed. Took 3.219 secs.
BUILD SUCCESSFUL
Total time: 9.28 secs
Stopped 0 compiler daemon(s).
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.