Skip to content

Commit 0c53f76

Browse files
benjaminfruehmejo-
authored andcommitted
Changed deleteOrphanedSteps to respect document versioning and added a safety buffer
Signed-off-by: Benjamin Frueh <[email protected]>
1 parent 07c84df commit 0c53f76

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tests/unit/Db/SessionMapperTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -155,17 +155,17 @@ public function testDeleteOrphanedSteps() {
155155
// Create Orphaned step without document (delete)
156156
$this->stepMapper->insert(Step::fromParams([
157157
'sessionId' => 99999,
158-
'documentId' => 99999,
158+
'documentId' => 99999,
159159
'data' => 'ORPHANED_NO_DOC',
160160
'version' => 1
161-
]));
162-
161+
]));
162+
163163
// Orphaned "old" step with document and old version (delete)
164164
$this->stepMapper->insert(Step::fromParams([
165165
'id' => 1,
166166
'sessionId' => 99999,
167167
'documentId' => $document->getId(),
168-
'data' => 'ORPHANED_OLD_VERSION',
168+
'data' => 'ORPHANED_OLD_VERSION',
169169
'timestamp' => $oldTimestamp,
170170
'version' => 1
171171
]));
@@ -184,7 +184,7 @@ public function testDeleteOrphanedSteps() {
184184
'id' => 101,
185185
'sessionId' => 99999,
186186
'documentId' => $document->getId(),
187-
'data' => 'ORPHANED_NEW_VERSION',
187+
'data' => 'ORPHANED_NEW_VERSION',
188188
'timestamp' => $oldTimestamp,
189189
'version' => 3
190190
]));

0 commit comments

Comments
 (0)