Skip to content
Snippets Groups Projects
Commit 0c1d80d9 authored by piotr.kupczyk@id.ethz.ch's avatar piotr.kupczyk@id.ethz.ch
Browse files

SSDM-13578 : 2PT : Database and V3 Implementation - js facade

parent e8e34a09
No related branches found
No related tags found
1 merge request!40SSDM-13578 : 2PT : Database and V3 Implementation - include the new AFS "free"...
......@@ -281,6 +281,58 @@ exports.default = new Promise((resolve) => {
}
})
QUnit.test("rollback() without transaction", async function (assert) {
const testInteractiveSessionKey = "test-interactive-session-key"
try {
var c = new common(assert, dtos)
c.start()
var facade = createFacade()
await c.login(facade)
facade.setInteractiveSessionKey(testInteractiveSessionKey)
try {
await facade.rollbackTransaction()
c.fail()
} catch (error) {
c.assertEqual(error.message, "Operation cannot be executed. No active transaction found.")
}
c.finish()
} catch (error) {
c.fail(JSON.stringify(error))
c.finish()
}
})
QUnit.test("commit() without transaction", async function (assert) {
const testInteractiveSessionKey = "test-interactive-session-key"
try {
var c = new common(assert, dtos)
c.start()
var facade = createFacade()
await c.login(facade)
facade.setInteractiveSessionKey(testInteractiveSessionKey)
try {
await facade.commitTransaction()
c.fail()
} catch (error) {
c.assertEqual(error.message, "Operation cannot be executed. No active transaction found.")
}
c.finish()
} catch (error) {
c.fail(JSON.stringify(error))
c.finish()
}
})
QUnit.test("AS method failing", async function (assert) {
const testInteractiveSessionKey = "test-interactive-session-key"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment