diff --git a/UnitTests/HttpInterface/arangodb.rb b/UnitTests/HttpInterface/arangodb.rb index 9eb1532903..f54d51c41f 100644 --- a/UnitTests/HttpInterface/arangodb.rb +++ b/UnitTests/HttpInterface/arangodb.rb @@ -67,8 +67,9 @@ class ArangoDB # expect json as output/response format format :json - # set timeout to 120 seconds - default_timeout 120 + # set timeout to 300 seconds - so we will see timeouts in the cluster with ther + # respective error messages from the coordinator. + default_timeout 300 # do not verify SSL default_options[:verify] = false diff --git a/arangod/VocBase/transaction.cpp b/arangod/VocBase/transaction.cpp index 2ec5300bac..4bb2a66993 100644 --- a/arangod/VocBase/transaction.cpp +++ b/arangod/VocBase/transaction.cpp @@ -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) { diff --git a/js/server/modules/org/arangodb/aql.js b/js/server/modules/org/arangodb/aql.js index 3c235dd86c..f46eefdb4a 100644 --- a/js/server/modules/org/arangodb/aql.js +++ b/js/server/modules/org/arangodb/aql.js @@ -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; }