chore: reduce wait interval in plugin test (#6708)

Reviewed-by: Mm2PL <mm2pl+gh@kotmisia.pl>
This commit is contained in:
pajlada
2026-01-04 14:23:08 +01:00
committed by GitHub
parent 18e3d7c72b
commit 6935c7d7a0
2 changed files with 5 additions and 3 deletions
+3 -2
View File
@@ -32,7 +32,8 @@ public:
this->condition_.notify_one();
}
void waitForRequest()
void waitForRequest(
std::chrono::milliseconds interval = std::chrono::milliseconds(10))
{
using namespace std::chrono_literals;
auto start = std::chrono::system_clock::now();
@@ -41,7 +42,7 @@ public:
{
{
std::unique_lock lck(this->mutex_);
bool done = this->condition_.wait_for(lck, 10ms, [this] {
bool done = this->condition_.wait_for(lck, interval, [this] {
return this->requestDone_;
});
if (done)
+2 -1
View File
@@ -34,6 +34,7 @@
using namespace chatterino;
using chatterino::mock::MockChannel;
using namespace std::chrono_literals;
namespace {
@@ -626,7 +627,7 @@ TEST_F(PluginTest, testTimerRec)
end
c2.later(f, 1)
)lua");
waiter.waitForRequest();
waiter.waitForRequest(1ms);
}
TEST_F(PluginTest, tryCallTest)