Skip to content

Commit 9ad84bd

Browse files
authored
teskit-backend: do not remove handlers for transaction and session when it gets closed (#737)
It could causing issues during miss driver usage tests (like commit in a already commited transaction, for example)
1 parent 1a4fe11 commit 9ad84bd

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

testkit-backend/src/request-handlers.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ export function SessionClose (context, data, wire) {
7272
wire.writeResponse('Session', { id: sessionId })
7373
})
7474
.catch(err => wire.writeError(err))
75-
context.removeSession(sessionId)
7675
}
7776

7877
export function SessionRun (context, data, wire) {
@@ -169,7 +168,6 @@ export function RetryablePositive (context, data, wire) {
169168
const { sessionId } = data
170169
context.getTxsBySessionId(sessionId).forEach(tx => {
171170
tx.resolve()
172-
context.removeTx(tx.id)
173171
})
174172
}
175173

@@ -178,7 +176,6 @@ export function RetryableNegative (context, data, wire) {
178176
const error = context.getError(errorId) || new Error('Client error')
179177
context.getTxsBySessionId(sessionId).forEach(tx => {
180178
tx.reject(error)
181-
context.removeTx(tx.id)
182179
})
183180
}
184181

@@ -207,7 +204,6 @@ export function TransactionRollback (context, data, wire) {
207204
tx.rollback()
208205
.then(() => wire.writeResponse('Transaction', { id }))
209206
.catch(e => wire.writeError(e))
210-
context.removeTx(id)
211207
}
212208

213209
export function SessionLastBookmarks (context, data, wire) {

0 commit comments

Comments
 (0)