diff --git a/docs/unittest_doc.md b/docs/unittest_doc.md index f804751f..93beebd2 100755 --- a/docs/unittest_doc.md +++ b/docs/unittest_doc.md @@ -396,7 +396,7 @@ Asserts that the given `condition` is true.
 load("@bazel_skylib//lib:unittest.bzl", "loadingtest")
 
-loadingtest.equals(env, test_case, expected, actual)
+loadingtest.equals(env, test_case, expected, actual, timeout)
 
Creates a test case for asserting state at LOADING phase. @@ -410,6 +410,7 @@ Creates a test case for asserting state at LOADING phase. | test_case | Name of the test case | none | | expected | Expected value to test | none | | actual | Actual value received. | none | +| timeout | Test timeout passed into the generated rule. | `"short"` | **RETURNS** diff --git a/lib/unittest.bzl b/lib/unittest.bzl index 3860ad19..04dd50d9 100644 --- a/lib/unittest.bzl +++ b/lib/unittest.bzl @@ -640,7 +640,7 @@ def _loading_make(name): ) return struct(name = name) -def _loading_assert_equals(env, test_case, expected, actual): +def _loading_assert_equals(env, test_case, expected, actual, timeout = "short"): """Creates a test case for asserting state at LOADING phase. Args: @@ -648,6 +648,7 @@ def _loading_assert_equals(env, test_case, expected, actual): test_case: Name of the test case expected: Expected value to test actual: Actual value received. + timeout: Test timeout passed into the generated rule. Returns: None, creates test case @@ -661,6 +662,7 @@ def _loading_assert_equals(env, test_case, expected, actual): name = "%s_%s" % (env.name, test_case), failure_message = msg, tags = [env.name + "_test_case"], + timeout = timeout, ) asserts = struct(