Skip to content

Commit

Permalink
Add Process.sleep(10) to the "slow sink" test
Browse files Browse the repository at this point in the history
  • Loading branch information
antonmi committed Jun 10, 2024
1 parent d593b09 commit 8c052f7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/sink_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,9 @@ defmodule Strom.SinkTest do
%{num2: num2} = Composite.call(flow, composite)
Enum.to_list(num2)

Process.sleep(10)
transformer = Enum.find(composite.components, &is_struct(&1, Transformer))
assert length(:sys.get_state(transformer.pid).data[:num1]) == 10
assert length(:sys.get_state(transformer.pid).data[:num1]) >= 10
assert :sys.get_state(transformer.pid).data[:num2] == []

sink = Enum.find(composite.components, &is_struct(&1, Sink))
Expand Down

0 comments on commit 8c052f7

Please sign in to comment.