Include recorder lifetime guard in pause/resume test backport
This commit is contained in:
1 parent
7043dc72d3
commit
45585daeaa
2 files changed
+5
-4
No files matched your search
@@ -1,8 +1,8 @@
|
||||
diff --git a/tests/bridge_test.cpp b/tests/bridge_test.cpp
|
||||
index bab79f2..9c9a38e 100644
|
||||
index bab79f2..9bed7be 100644
|
||||
--- a/tests/bridge_test.cpp
|
||||
+++ b/tests/bridge_test.cpp
|
||||
@@ -79,37 +79,52 @@ private slots:
|
||||
@@ -79,37 +79,53 @@ private slots:
|
||||
const auto before = bridge.history().size();
|
||||
QTest::qWait(1100);
|
||||
QCOMPARE(bridge.history().size(), before);
|
||||
@@ -11,7 +11,8 @@ index bab79f2..9c9a38e 100644
|
||||
+ // replace bridge.snapshot() before the waiting assertion runs.
|
||||
+ QVariantList samples;
|
||||
+ QList<int> historySizes;
|
||||
+ connect(&bridge, &Bridge::snapshotChanged, &bridge, [&] {
|
||||
+ QObject sampleObserver; // Disconnect before the captured lists are destroyed.
|
||||
+ connect(&bridge, &Bridge::snapshotChanged, &sampleObserver, [&] {
|
||||
+ samples.append(bridge.snapshot());
|
||||
+ historySizes.append(bridge.history().size());
|
||||
+ });
|
||||
|
||||
Reference in new issue
Block a user