Skip to content

Commit

Permalink
fix ets cron flusher test
Browse files Browse the repository at this point in the history
  • Loading branch information
bangalcat committed Nov 23, 2022
1 parent 66dc0c0 commit bdda40a
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions test/prom_ex/ets_cron_flusher_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,17 @@ defmodule PromEx.ETSCronFlusherTest do

Events.execute_all(:phoenix)

assert length(get_metrics_table(DefaultPromExSetUp)) == 5
assert length(get_dist_table(DefaultPromExSetUp)) == 40
assert length(get_metrics_table(DefaultPromExSetUp)) == 6
assert length(get_dist_table(DefaultPromExSetUp)) == 42

Events.execute_all(:phoenix)

assert length(get_metrics_table(DefaultPromExSetUp)) == 5
assert length(get_dist_table(DefaultPromExSetUp)) == 80
assert length(get_metrics_table(DefaultPromExSetUp)) == 6
assert length(get_dist_table(DefaultPromExSetUp)) == 84

Process.sleep(8_000)

assert length(get_metrics_table(DefaultPromExSetUp)) == 11
assert length(get_metrics_table(DefaultPromExSetUp)) == 14
assert get_dist_table(DefaultPromExSetUp) == []

new_timer_ref = get_timer_ref(DefaultPromExSetUp)
Expand All @@ -72,17 +72,17 @@ defmodule PromEx.ETSCronFlusherTest do

Events.execute_all(:phoenix)

assert length(get_metrics_table(ManualPromExSetUp)) == 5
assert length(get_dist_table(ManualPromExSetUp)) == 40
assert length(get_metrics_table(ManualPromExSetUp)) == 6
assert length(get_dist_table(ManualPromExSetUp)) == 42

Events.execute_all(:phoenix)

assert length(get_metrics_table(ManualPromExSetUp)) == 5
assert length(get_dist_table(ManualPromExSetUp)) == 80
assert length(get_metrics_table(ManualPromExSetUp)) == 6
assert length(get_dist_table(ManualPromExSetUp)) == 84

Process.sleep(3_500)

assert length(get_metrics_table(ManualPromExSetUp)) == 11
assert length(get_metrics_table(ManualPromExSetUp)) == 14
assert get_dist_table(ManualPromExSetUp) == []

new_timer_ref = get_timer_ref(ManualPromExSetUp)
Expand Down

0 comments on commit bdda40a

Please sign in to comment.