Skip to content

Commit fea38e7

Browse files
committed
Made PluginInfoTest run on the message thread as the functions it calls aren't thread-safe
1 parent ee7e2aa commit fea38e7

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

CHANGELIST.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
### 1.0.5
44
- Added static linking to the Windows runtime so it should run on more Windows systems (particularly non-dev machines)
5+
- Made `PluginInfoTest` run on the message thread as the functions it calls aren't thread-safe
56

67
### 1.0.4
78
- Limit auval's stress test to 20 seconds (vs 600) [#135]

Source/PluginTests.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -193,10 +193,10 @@ void PluginTests::testType (const juce::PluginDescription& pd)
193193
{
194194
juce::WaitableEvent completionEvent;
195195
juce::MessageManager::callAsync ([&, this]() mutable
196-
{
197-
t->runTest (*this, *instance);
198-
completionEvent.signal();
199-
});
196+
{
197+
t->runTest (*this, *instance);
198+
completionEvent.signal();
199+
});
200200
completionEvent.wait();
201201
}
202202
else

Source/tests/BasicTests.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@
2222
struct PluginInfoTest : public PluginTest
2323
{
2424
PluginInfoTest()
25-
: PluginTest ("Plugin info", 1)
25+
: PluginTest ("Plugin info", 1,
26+
{ Requirements::Thread::messageThread })
2627
{
2728
}
2829

0 commit comments

Comments
 (0)