1
0
Fork 0

deadlock tests for drivers

This commit is contained in:
Jan Steemann 2015-12-07 14:59:31 +01:00
parent 3c0aecf0bd
commit 1daeb7ad28
2 changed files with 8 additions and 2 deletions

View File

@ -398,14 +398,14 @@ static int LockCollection (TRI_transaction_collection_t* trxCollection,
nestingLevel,
"read-locking collection %llu",
(unsigned long long) trxCollection->_cid);
res = document->beginReadTimed(trx->_timeout, TRI_TRANSACTION_DEFAULT_SLEEP_DURATION);
res = document->beginReadTimed(trx->_timeout, TRI_TRANSACTION_DEFAULT_SLEEP_DURATION * 3);
}
else {
LOG_TRX(trx,
nestingLevel,
"write-locking collection %llu",
(unsigned long long) trxCollection->_cid);
res = document->beginWriteTimed(trx->_timeout, TRI_TRANSACTION_DEFAULT_SLEEP_DURATION * 50);
res = document->beginWriteTimed(trx->_timeout, TRI_TRANSACTION_DEFAULT_SLEEP_DURATION * 3);
}
if (res == TRI_ERROR_NO_ERROR) {

View File

@ -4619,6 +4619,12 @@ function AQL_TEST_MODIFY (test, what) {
delete what.f;
what.g = "foo";
}
else if (test === 'DEADLOCK') {
var err = new ArangoError();
err.errorNum = INTERNAL.errors.ERROR_DEADLOCK.code;
err.errorMessage = INTERNAL.errors.ERROR_DEADLOCK.message;
throw err;
}
return what;
}