From 8c052f77177403c44ea7a89414a298e1a2c70909 Mon Sep 17 00:00:00 2001 From: Anton Mishchuk Date: Mon, 10 Jun 2024 15:54:58 +0200 Subject: [PATCH] Add Process.sleep(10) to the "slow sink" test --- test/sink_test.exs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/sink_test.exs b/test/sink_test.exs index 5587fba..94d48b1 100644 --- a/test/sink_test.exs +++ b/test/sink_test.exs @@ -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))