From d507640eb00007bd209e915e21f105ecaa73884e Mon Sep 17 00:00:00 2001 From: Takafumi Arakaki Date: Thu, 26 Jul 2018 12:59:09 -0700 Subject: [PATCH] Show message in tests to avoid stall in Travis --- test/preamble.jl | 1 + test/test_fold_lc.jl | 12 +++++++++--- test/test_hopf_to_lc.jl | 11 ++++++++--- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/test/preamble.jl b/test/preamble.jl index 2f5e374..6956ad6 100644 --- a/test/preamble.jl +++ b/test/preamble.jl @@ -1,5 +1,6 @@ using Base.Test using Compat +using Compat: @info using Setfield: @lens using Bifurcations diff --git a/test/test_fold_lc.jl b/test/test_fold_lc.jl index 7a82fe7..ccee268 100644 --- a/test/test_fold_lc.jl +++ b/test/test_fold_lc.jl @@ -26,14 +26,17 @@ solver_lc = init( max_branches = 0, nominal_angle_rad = 0.01, ) -solve!(solver_lc) +@info "Solving LimitCycleProblem..." +@time solve!(solver_lc) +@info "Testing LimitCycleProblem solution..." @test_broken length(solver_lc.sweeps[1].super.simple_bifurcation) == 0 -flc_points = resolved_points(solver_lc) +@time flc_points = resolved_points(solver_lc) @test_broken length(flc_points) == 1 @test flc_points[1].point_type === Codim1LimitCycle.PointTypes.saddle_node +@info "Preparing FoldLimitCycleProblem..." prob_flc = BifurcationProblem( flc_points[1], solver_lc, @@ -47,6 +50,9 @@ solver_flc = init( max_branches = 0, nominal_angle_rad = 0.01, ) -solve!(solver_flc) +@info "Solving FoldLimitCycleProblem..." +@time solve!(solver_flc) + +@info "Done!" end # module diff --git a/test/test_hopf_to_lc.jl b/test/test_hopf_to_lc.jl index bef5d5b..752a091 100644 --- a/test/test_hopf_to_lc.jl +++ b/test/test_hopf_to_lc.jl @@ -21,21 +21,26 @@ solver1 = init( prob_lc; start_from_nearest_root = true, ) -solve!(solver1) +@info "Solving LimitCycleProblem..." +@time solve!(solver1) +@info "Testing LimitCycleProblem solution..." periods = [lc.period for lc in limitcycles(solver1)] @test length(periods) > 0 @test all(!isnan, periods) @test maximum(periods) >= period_max # it is stopped due to out-of-domain @test minimum(periods) > 0 -plt_multi_panel = plot( +@info "Plotting LimitCycleProblem solution..." +@time plt_multi_panel = plot( plot(solver1, (:x=>:parameter, :y=>1, :color=>:period)), plot(solver1, (:x=>:parameter, :y=>:period, :color=>:period)), plot_state_space(solver1); clims = (10, period_max), # TODO: make it work without this ) -@test_nothrow nullshow(plt_multi_panel) +@time @test_nothrow nullshow(plt_multi_panel) + +@info "Done!" end # module