Commit 9983799c authored by Alex Gleason's avatar Alex Gleason
Browse files

Merge branch 'less_erratic_expiration_test' into 'develop'

Make test less erratic by adding five second tolerance

See merge request !3614
parents 263b42a7 7a015b1f
Pipeline #38803 failed with stages
in 13 minutes and 10 seconds
......@@ -49,7 +49,6 @@ test "a common filter", %{conn: conn, user: user} do
assert filter.hide == true
@tag :erratic
test "a filter with expires_in", %{conn: conn, user: user} do
in_seconds = 600
......@@ -65,12 +64,13 @@ test "a filter with expires_in", %{conn: conn, user: user} do
assert response["irreversible"] == false
expires_at =
expected_expiration =
|> NaiveDateTime.add(in_seconds)
|> Pleroma.Web.CommonAPI.Utils.to_masto_date()
assert response["expires_at"] == expires_at
{:ok, actual_expiration} = NaiveDateTime.from_iso8601(response["expires_at"])
assert abs(NaiveDateTime.diff(expected_expiration, actual_expiration)) <= 5
filter = Filter.get(response["id"], user)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment