From 1223444738d8cef6b311200a0af94598431f9f89 Mon Sep 17 00:00:00 2001 From: uchoudh <55554767+uchoudh@users.noreply.github.com> Date: Fri, 11 Oct 2019 11:52:07 -0400 Subject: [PATCH] Fix flaky tests (#1186) --- test/integration/render_profiling_test.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/integration/render_profiling_test.rb b/test/integration/render_profiling_test.rb index 17afe2ac3..2d460613f 100644 --- a/test/integration/render_profiling_test.rb +++ b/test/integration/render_profiling_test.rb @@ -154,18 +154,18 @@ def test_profiling_marks_children_of_for_blocks assert_equal(2, t.profiler[0].children.length) end - def test_total_time_equals_self_time_in_leaf + def test_profiling_supports_self_time t = Template.parse("{% for item in collection %} {{ item }} {% endfor %}", profile: true) t.render!("collection" => ["one", "two"]) leaf = t.profiler[0].children[0] - assert_equal leaf.total_time, leaf.self_time + assert_operator leaf.self_time, :>, 0 end - def test_total_time_greater_than_self_time_in_node + def test_profiling_supports_total_time t = Template.parse("{% if true %} {% increment test %} {{ test }} {% endif %}", profile: true) t.render! - assert_operator t.profiler[0].total_time, :>, t.profiler[0].self_time + assert_operator t.profiler[0].total_time, :>, 0 end end