From fce40cdf643678fdc66293db7e24b96fa0dc71ca Mon Sep 17 00:00:00 2001 From: hustf Date: Thu, 2 Nov 2017 21:30:35 +0100 Subject: [PATCH] modified: test/functions_log_test.jl Changed color symbols for 0.5 modified: test/functions_server.jl Changed color symbols for 0.5 modified: test/handler_functions_events.jl Changed color symbols for 0.5 modified: test/handler_functions_websockets_general_test.jl Changed color symbols for 0.5 modified: test/handler_functions_websockets_subprotocol_test.jl Changed color symbols for 0.5 modified: test/phantom.js Increase timeout to 20 s for travis linux. --- test/functions_log_test.jl | 4 ++-- test/functions_server.jl | 2 +- test/handler_functions_events.jl | 6 +++--- test/handler_functions_websockets_general_test.jl | 2 +- test/handler_functions_websockets_subprotocol_test.jl | 2 +- test/phantom.js | 4 ++-- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/test/functions_log_test.jl b/test/functions_log_test.jl index 54e8dd0..3a6eb09 100644 --- a/test/functions_log_test.jl +++ b/test/functions_log_test.jl @@ -35,7 +35,7 @@ function pwc(io::IO, args...) print(io,arg) end end - print(io, Base.color_normal) + print(io, :normal) nothing end "Type piracy on dictionaries, not nice normally" @@ -55,7 +55,7 @@ function print(io::IO, headers::Dict{String, Function}) end "Add color code" -print_color(io::IO, color::Symbol) = print(io, get(Base.text_colors, color, Base.color_normal)) +print_color(io::IO, color::Symbol) = print(io, get(Base.text_colors, color, :normal)) "Return an IO stream with colored heading and tabs" function startbuf(prefix = "INFO:") buf = IOBuffer() diff --git a/test/functions_server.jl b/test/functions_server.jl index d65e70a..406750e 100644 --- a/test/functions_server.jl +++ b/test/functions_server.jl @@ -44,7 +44,7 @@ function websockethandle(wsrequest::Request, websocket::WebSocket) ws_test_protocol(websocket) clog(id, "Websocket-testprotocol, exiting handler\n") else - clog(id, Base.error_color(), "Unknown sub protocol let through WebSockets.jl, not responding further. \n") + clog(id, :red, "Unknown sub protocol let through WebSockets.jl, not responding further. \n") end else clog(id, "General websocket, calling handler\n") diff --git a/test/handler_functions_events.jl b/test/handler_functions_events.jl index 91b06c6..3cd2ad3 100644 --- a/test/handler_functions_events.jl +++ b/test/handler_functions_events.jl @@ -1,11 +1,11 @@ # Provides extra verbose output for testing function ev_error(client::Client, args...) id = "events.ev_error\t" - clog(id, Base.warn_color(), "client $client ", :normal, " ", args..., "\n") + clog(id, :yellow, "client $client ", :normal, " ", args..., "\n") end function ev_listen(port, args...) id = "events.ev_listen\t" - #clog(id, :light_yellow, " from port ", :bold, port , :normal, " ", args..., " that was all I think. \n") + #clog(id, :yellow, " from port ", :bold, port , :normal, " ", args..., " that was all I think. \n") end function ev_connect(client::Client, args...) id = "events.ev_connect\t" @@ -17,7 +17,7 @@ function ev_close(client::Client, args...) end function ev_write(client::Client, response::Response) id = "events.ev_write\t" - #clog(id, "to ",:light_yellow, client , :bold, client , :normal, "\n", response, "\n") + #clog(id, "to ",:yellow, client , :bold, client , :normal, "\n", response, "\n") end function ev_reset(client::Client, response::Response) id = "events.ev_reset\t" diff --git a/test/handler_functions_websockets_general_test.jl b/test/handler_functions_websockets_general_test.jl index 7e64c3b..9448eea 100644 --- a/test/handler_functions_websockets_general_test.jl +++ b/test/handler_functions_websockets_general_test.jl @@ -44,7 +44,7 @@ function wsmsg_general(ws::WebSockets.WebSocket) if typeof(e) == WebSockets.WebSocketClosedError clog(id, :green, " Websocket was or is being closed.\n") else - clog(id, "Caught exception..\n", "\t\t", Base.error_color(), e, "\n") + clog(id, "Caught exception..\n", "\t\t", :red, e, "\n") if isopen(ws) clog(id, "Closing\n") close(ws) diff --git a/test/handler_functions_websockets_subprotocol_test.jl b/test/handler_functions_websockets_subprotocol_test.jl index 8784aa8..eb1801c 100644 --- a/test/handler_functions_websockets_subprotocol_test.jl +++ b/test/handler_functions_websockets_subprotocol_test.jl @@ -37,7 +37,7 @@ function wsmsg_testprotocol(ws::WebSockets.WebSocket) if typeof(e) == WebSockets.WebSocketClosedError clog(id, :green, " Websocket was or is being closed.\n") else - clog(id, "Caught exception..\n", "\t\t", Base.error_color(), e, "\n") + clog(id, "Caught exception..\n", "\t\t", :red, e, "\n") if isopen(ws) clog(id, "Closing\n") close(ws) diff --git a/test/phantom.js b/test/phantom.js index 5fb568c..09aaf58 100644 --- a/test/phantom.js +++ b/test/phantom.js @@ -25,10 +25,10 @@ page.open(address, function(status) { console.log('PhantomJS loading time ' + t + ' msec'); window.setTimeout( (function() { page.render("phantomjs.png"); - console.log("PhantomJS saved render, exits after 20s") + console.log("PhantomJS saved render, exits after 30s") phantom.exit() }), - 20000) + 30000) } } );