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
@@ -14,7 +14,7 @@ checkdepends=('python' 'desktop-file-utils')
|
||||
source=("$url/releases/download/v$pkgver/$pkgname-$pkgver.tar.gz"
|
||||
"pause-resume-test.patch")
|
||||
sha256sums=('cc3e24a0bb8fad2b7ce0d4fb780aa774d32b53b8de924b488b55674bdb936c85'
|
||||
'ee97d57fed9f9d8b542b934f177560c8a6f0801642767d4d0787a183deafd09a')
|
||||
'ce191fc8dc7e4f7018193aa4982d58fd463f66b37e3129b3acce46b7a1c9a89e')
|
||||
|
||||
# Backport the test observation fix from upstream PR #11.
|
||||
prepare() {
|
||||
|
||||
@@ -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