chore: reduce wait interval in plugin test (#6708)
Reviewed-by: Mm2PL <mm2pl+gh@kotmisia.pl>
This commit is contained in:
@@ -32,7 +32,8 @@ public:
|
|||||||
this->condition_.notify_one();
|
this->condition_.notify_one();
|
||||||
}
|
}
|
||||||
|
|
||||||
void waitForRequest()
|
void waitForRequest(
|
||||||
|
std::chrono::milliseconds interval = std::chrono::milliseconds(10))
|
||||||
{
|
{
|
||||||
using namespace std::chrono_literals;
|
using namespace std::chrono_literals;
|
||||||
auto start = std::chrono::system_clock::now();
|
auto start = std::chrono::system_clock::now();
|
||||||
@@ -41,7 +42,7 @@ public:
|
|||||||
{
|
{
|
||||||
{
|
{
|
||||||
std::unique_lock lck(this->mutex_);
|
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_;
|
return this->requestDone_;
|
||||||
});
|
});
|
||||||
if (done)
|
if (done)
|
||||||
|
|||||||
@@ -34,6 +34,7 @@
|
|||||||
|
|
||||||
using namespace chatterino;
|
using namespace chatterino;
|
||||||
using chatterino::mock::MockChannel;
|
using chatterino::mock::MockChannel;
|
||||||
|
using namespace std::chrono_literals;
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
@@ -626,7 +627,7 @@ TEST_F(PluginTest, testTimerRec)
|
|||||||
end
|
end
|
||||||
c2.later(f, 1)
|
c2.later(f, 1)
|
||||||
)lua");
|
)lua");
|
||||||
waiter.waitForRequest();
|
waiter.waitForRequest(1ms);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(PluginTest, tryCallTest)
|
TEST_F(PluginTest, tryCallTest)
|
||||||
|
|||||||
Reference in New Issue
Block a user