Skip to content

Instantly share code, notes, and snippets.

@NicoleCarpenter
Created September 9, 2016 14:48
Show Gist options
  • Save NicoleCarpenter/78c3ed45827b08c5b842fd94a578694c to your computer and use it in GitHub Desktop.
Save NicoleCarpenter/78c3ed45827b08c5b842fd94a578694c to your computer and use it in GitHub Desktop.

Testing Issues on Http Server

  • ServerTest - Stuck in the loop, gets all of the way to the end of the loop after thread.start() but does not return to while condition, where I was stubbing value to end the loop.
  • HttpFileIOTest - Using absolute values, need to be able to assign root relatively for tests
  • HttpServerRunnerTest - Testing handler.handleRoute() when I don't know what handler is going to be returned from router
  • FileHandlerTest - Not testing file extension types, but the build up to test these things is pretty extensive, making me think this should be in another class?
  • MethodOptionsHandlerTest - Class is not correct so test is not correct. Not a problem, I just don't know how to define the class so I am not sure what test cases to include.
  • Multi-Threading - The Cob spec test on this fails every dozen or so attempts, I am not really even sure how to address this, or test it at all because I don't know how to replicate the issue.
  • FileHandler - How to stub files for directory test cases (created MockResponseBuilder to test that appropriate methods are being called rather than checking what is being returned)
  • HttpServerIOTest - readRequest() method (Something was wrong here, I had this commented out, but I uncommented it and it works so ¯_(ツ)/¯)_
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment