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
|
} // namespace arangodb
|
||||||
|
|
|
@ -43,6 +43,7 @@ class NetworkFeature final : public application_features::ApplicationFeature {
|
||||||
void prepare() override;
|
void prepare() override;
|
||||||
void start() override;
|
void start() override;
|
||||||
void beginShutdown() override;
|
void beginShutdown() override;
|
||||||
|
void stop() override;
|
||||||
|
|
||||||
/// @brief global connection pool
|
/// @brief global connection pool
|
||||||
static arangodb::network::ConnectionPool* pool() {
|
static arangodb::network::ConnectionPool* pool() {
|
||||||
|
@ -56,7 +57,6 @@ class NetworkFeature final : public application_features::ApplicationFeature {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
uint32_t _numIOThreads;
|
uint32_t _numIOThreads;
|
||||||
uint64_t _maxOpenConnections;
|
uint64_t _maxOpenConnections;
|
||||||
uint64_t _connectionTtlMilli;
|
uint64_t _connectionTtlMilli;
|
||||||
|
|
|
@ -246,6 +246,7 @@ function testSuite() {
|
||||||
},
|
},
|
||||||
|
|
||||||
testAnalyzerLinks : function() {
|
testAnalyzerLinks : function() {
|
||||||
|
try {
|
||||||
let body = JSON.stringify({
|
let body = JSON.stringify({
|
||||||
name : name,
|
name : name,
|
||||||
type : "text",
|
type : "text",
|
||||||
|
@ -279,8 +280,14 @@ function testSuite() {
|
||||||
// delete with force - must succeed
|
// delete with force - must succeed
|
||||||
result = arango.DELETE("/_api/analyzer/" + name + "?force=true");
|
result = arango.DELETE("/_api/analyzer/" + name + "?force=true");
|
||||||
assertFalse(result.error);
|
assertFalse(result.error);
|
||||||
|
} finally {
|
||||||
db._drop(col.name());
|
try {
|
||||||
|
db._drop("ulfColTestLinks");
|
||||||
|
} catch (_) {}
|
||||||
|
try {
|
||||||
|
db._dropView("ulfViewTestLinks");
|
||||||
|
} catch (_) {}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}; // return
|
}; // return
|
||||||
} // end of suite
|
} // end of suite
|
||||||
|
|
|
@ -43,6 +43,14 @@ var ERRORS = arangodb.errors;
|
||||||
function ViewSuite () {
|
function ViewSuite () {
|
||||||
'use strict';
|
'use strict';
|
||||||
return {
|
return {
|
||||||
|
tearDown : function () {
|
||||||
|
try {
|
||||||
|
db._dropView("abc");
|
||||||
|
} catch (_) {}
|
||||||
|
try {
|
||||||
|
db._dropView("def");
|
||||||
|
} catch (_) {}
|
||||||
|
},
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief bad name (empty)
|
/// @brief bad name (empty)
|
||||||
|
|
Loading…
Reference in New Issue