From 6aea929c98a0b2747b376102c50d4ab8f59f1531 Mon Sep 17 00:00:00 2001 From: nelsonic Date: Sun, 11 Aug 2019 19:12:14 +0100 Subject: [PATCH] add test to check discards backend errors p.287 #1 --- apps/info_sys/test/info_sys_test.exs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/apps/info_sys/test/info_sys_test.exs b/apps/info_sys/test/info_sys_test.exs index b4615a6..b90d01a 100644 --- a/apps/info_sys/test/info_sys_test.exs +++ b/apps/info_sys/test/info_sys_test.exs @@ -30,4 +30,14 @@ defmodule InfoSysTest do test "compute/2 with no backend results" do assert [] = InfoSys.compute("none", backends: [TestBackend]) end + + test "compute/2 with timeout returns no results" do + results = InfoSys.compute("timeout", backends: [TestBackend, timeout: 10]) + assert results == [] + end +end + +@tag :capture_log +test "compute/2 discards backend errors" do + assert InfoSys.compute("boom", backends: [TestBackend]) == [] end