File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -78,4 +78,10 @@ component {
7878 );
7979 }
8080
81+ function sleep ( event , rc , prc ) {
82+ param rc .delay = 0 ;
83+ sleep ( rc .delay * 1000 );
84+ return event .renderData ( type = " plain" , statusCode = 200 , data = " Slept for #rc .delay # seconds." );
85+ }
86+
8187}
Original file line number Diff line number Diff line change 11component extends = " tests.resources.ModuleIntegrationSpec" appMapping = " /app" {
22
3+ variables .localEndpoint = " http://#CGI [ " server_name" ] #:#CGI [ " server_port" ] #/tests/resources/app/index.cfm/api" ;
4+
35 function run () {
46 describe ( " incomplete requests" , function () {
57 beforeEach ( function () {
@@ -19,10 +21,7 @@ component extends="tests.resources.ModuleIntegrationSpec" appMapping="/app" {
1921 } );
2022
2123 it ( " returns a 408 status code for any request that times out" , function () {
22- var res = hyper .setTimeout ( 1 ).get ( " https://httpbin.org/delay/5" );
23- if ( res .getStatusCode () == 503 ) {
24- skip ( " Got a 503 from the server. Skipping test." );
25- }
24+ var res = hyper .setTimeout ( 1 ).get ( " #localEndpoint #/sleep/delay/5" );
2625 expect ( res .getStatusCode () ).toBe ( 408 );
2726 expect ( res .getStatusText () ).toBe ( " Request Timeout" );
2827 } );
You can’t perform that action at this time.
0 commit comments