chore: fix flaky test
This commit is contained in:
parent
d0a7e7c406
commit
87c5170696
|
@ -530,15 +530,16 @@ t_write_failure(Config) ->
|
||||||
fun(Trace0) ->
|
fun(Trace0) ->
|
||||||
ct:pal("trace: ~p", [Trace0]),
|
ct:pal("trace: ~p", [Trace0]),
|
||||||
Trace = ?of_kind(buffer_worker_flush_nack, Trace0),
|
Trace = ?of_kind(buffer_worker_flush_nack, Trace0),
|
||||||
?assertMatch([#{result := {async_return, {error, _}}} | _], Trace),
|
[#{result := Result} | _] = Trace,
|
||||||
[#{result := {async_return, {error, Error}}} | _] = Trace,
|
case Result of
|
||||||
case Error of
|
{async_return, {error, {resource_error, _}}} ->
|
||||||
{resource_error, _} ->
|
|
||||||
ok;
|
ok;
|
||||||
{recoverable_error, disconnected} ->
|
{async_return, {error, {recoverable_error, disconnected}}} ->
|
||||||
|
ok;
|
||||||
|
{error, {resource_error, _}} ->
|
||||||
ok;
|
ok;
|
||||||
_ ->
|
_ ->
|
||||||
ct:fail("unexpected error: ~p", [Error])
|
ct:fail("unexpected error: ~p", [Result])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
),
|
),
|
||||||
|
|
Loading…
Reference in New Issue