mirror of https://gitee.com/bigwinds/arangodb
Added a stop to Network feature. There is a race condition on the gar… (#9892)
* Added a stop to Network feature. There is a race condition on the garbage collection post * Added cleanup for analyzer test and view test * Update tests/js/client/shell/shell-analyzer-rest-api.js Fixed usage of wrong command
This commit is contained in:
parent
412e5280bc
commit
1b1763c496
|
@ -149,4 +149,10 @@ void NetworkFeature::beginShutdown() {
|
|||
}
|
||||
}
|
||||
|
||||
void NetworkFeature::stop() {
|
||||
// we might have posted another workItem during shutdown.
|
||||
std::lock_guard<std::mutex> guard(_workItemMutex);
|
||||
_workItem.reset();
|
||||
}
|
||||
|
||||
} // namespace arangodb
|
||||
|
|
|
@ -43,6 +43,7 @@ class NetworkFeature final : public application_features::ApplicationFeature {
|
|||
void prepare() override;
|
||||
void start() override;
|
||||
void beginShutdown() override;
|
||||
void stop() override;
|
||||
|
||||
/// @brief global connection pool
|
||||
static arangodb::network::ConnectionPool* pool() {
|
||||
|
@ -56,7 +57,6 @@ class NetworkFeature final : public application_features::ApplicationFeature {
|
|||
#endif
|
||||
|
||||
private:
|
||||
|
||||
uint32_t _numIOThreads;
|
||||
uint64_t _maxOpenConnections;
|
||||
uint64_t _connectionTtlMilli;
|
||||
|
|
|
@ -246,6 +246,7 @@ function testSuite() {
|
|||
},
|
||||
|
||||
testAnalyzerLinks : function() {
|
||||
try {
|
||||
let body = JSON.stringify({
|
||||
name : name,
|
||||
type : "text",
|
||||
|
@ -279,8 +280,14 @@ function testSuite() {
|
|||
// delete with force - must succeed
|
||||
result = arango.DELETE("/_api/analyzer/" + name + "?force=true");
|
||||
assertFalse(result.error);
|
||||
|
||||
db._drop(col.name());
|
||||
} finally {
|
||||
try {
|
||||
db._drop("ulfColTestLinks");
|
||||
} catch (_) {}
|
||||
try {
|
||||
db._dropView("ulfViewTestLinks");
|
||||
} catch (_) {}
|
||||
}
|
||||
}
|
||||
}; // return
|
||||
} // end of suite
|
||||
|
|
|
@ -43,6 +43,14 @@ var ERRORS = arangodb.errors;
|
|||
function ViewSuite () {
|
||||
'use strict';
|
||||
return {
|
||||
tearDown : function () {
|
||||
try {
|
||||
db._dropView("abc");
|
||||
} catch (_) {}
|
||||
try {
|
||||
db._dropView("def");
|
||||
} catch (_) {}
|
||||
},
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief bad name (empty)
|
||||
|
|
Loading…
Reference in New Issue