From 1c04192c51fee21b4f9c2f4d732ddb68376b708a Mon Sep 17 00:00:00 2001 From: Marcus Tillmanns Date: Thu, 2 May 2024 15:42:55 +0200 Subject: [PATCH] Lua: Add waitms test Change-Id: I281f0a5595140ff450e1a30e189286e1a5d8cf9d Reviewed-by: Marcus Tillmanns --- src/plugins/luatests/luatests/tst_utils.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/plugins/luatests/luatests/tst_utils.lua b/src/plugins/luatests/luatests/tst_utils.lua index c6bbfcf084c..940f6ff7e97 100644 --- a/src/plugins/luatests/luatests/tst_utils.lua +++ b/src/plugins/luatests/luatests/tst_utils.lua @@ -20,7 +20,15 @@ local function testSearchInPath() print("Hostname found at:", result) end +local function testWaitMs() + local u = require("Utils") + print("Starting to wait ...") + a.wait(u.waitms(1000)) + print("About a second should have elapsed now.") +end + return { testDirEntries = testDirEntries, testSearchInPath = testSearchInPath, + testWaitMs = testWaitMs, }