mirror of
https://github.com/livebook-dev/livebook.git
synced 2025-10-12 22:46:17 +08:00
Add second retry in storage test
This commit is contained in:
parent
45ad6f0b76
commit
1c98a2a360
1 changed files with 6 additions and 4 deletions
|
@ -107,11 +107,13 @@ defmodule Livebook.StorageTest do
|
||||||
defp read_table_and_lookup(entity) do
|
defp read_table_and_lookup(entity) do
|
||||||
Process.sleep(1)
|
Process.sleep(1)
|
||||||
|
|
||||||
{:ok, tab} =
|
|
||||||
with {:error, _} <- read_table() do
|
|
||||||
# :ets.tab2file is asynchronous and may occasionally take
|
# :ets.tab2file is asynchronous and may occasionally take
|
||||||
# longer, so we retry once
|
# longer, so we retry
|
||||||
Process.sleep(100)
|
{:ok, tab} =
|
||||||
|
with {:error, _} <- read_table(),
|
||||||
|
:ok <- Process.sleep(100),
|
||||||
|
{:error, _} <- read_table(),
|
||||||
|
:ok <- Process.sleep(1000) do
|
||||||
read_table()
|
read_table()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue