mirror of https://gitee.com/bigwinds/arangodb
deadlock tests for drivers
This commit is contained in:
parent
3c0aecf0bd
commit
1daeb7ad28
|
@ -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) {
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue