mirror of https://gitee.com/bigwinds/arangodb
bug-fix/internal-issue-#595 (#9440)
* address ASAN failures in tests * Add --isAsan for testing.js * Fix typo
This commit is contained in:
parent
e4d76e087f
commit
b3690fc24f
|
@ -634,6 +634,8 @@ function runThere (options, instanceInfo, file) {
|
|||
|
||||
let httpOptions = pu.makeAuthorizationHeaders(options);
|
||||
httpOptions.method = 'POST';
|
||||
|
||||
if (options.isAsan) { options.oneTestTimeout *= 2; }
|
||||
httpOptions.timeout = options.oneTestTimeout;
|
||||
|
||||
if (options.valgrind) {
|
||||
|
|
|
@ -76,6 +76,7 @@ let optionsDocumentation = [
|
|||
' - `agencySize`: number of agents in agency',
|
||||
' - `agencySupervision`: run supervision in agency',
|
||||
' - `oneTestTimeout`: how long a single testsuite (.js, .rb) should run',
|
||||
' - `isAsan`: doubles oneTestTimeot value if set to true (for ASAN-related builds)',
|
||||
' - `test`: path to single test to execute for "single" test target',
|
||||
' - `cleanup`: if set to true (the default), the cluster data files',
|
||||
' and logs are removed after termination of the test.',
|
||||
|
@ -176,6 +177,7 @@ const optionsDefaults = {
|
|||
'skipGrey': false,
|
||||
'onlyGrey': false,
|
||||
'oneTestTimeout': 2700,
|
||||
'isAsan': false,
|
||||
'skipTimeCritical': false,
|
||||
'storageEngine': 'rocksdb',
|
||||
'test': undefined,
|
||||
|
|
|
@ -2250,6 +2250,8 @@ TEST_F(IResearchAnalyzerFeatureTest, test_remove) {
|
|||
arangodb::aql::OptimizerRulesFeature(this->server).unprepare();
|
||||
});
|
||||
|
||||
auto cleanup = arangodb::scopeGuard([dbFeature](){dbFeature->unprepare(); });
|
||||
|
||||
// create system vocbase (before feature start)
|
||||
{
|
||||
auto const databases = VPackParser::fromJson(
|
||||
|
@ -2330,6 +2332,8 @@ TEST_F(IResearchAnalyzerFeatureTest, test_remove) {
|
|||
arangodb::aql::OptimizerRulesFeature(this->server).unprepare();
|
||||
});
|
||||
|
||||
auto cleanup = arangodb::scopeGuard([dbFeature](){dbFeature->unprepare(); });
|
||||
|
||||
// create system vocbase (before feature start)
|
||||
{
|
||||
auto const databases = VPackParser::fromJson(
|
||||
|
@ -2708,6 +2712,7 @@ TEST_F(IResearchAnalyzerFeatureTest, test_tokens) {
|
|||
auto* analyzers = new arangodb::iresearch::IResearchAnalyzerFeature(server);
|
||||
auto* functions = new arangodb::aql::AqlFunctionFeature(server);
|
||||
auto* dbfeature = new arangodb::DatabaseFeature(server);
|
||||
auto cleanup = arangodb::scopeGuard([dbfeature](){ dbfeature->unprepare(); });
|
||||
auto* sharding = new arangodb::ShardingFeature(server);
|
||||
auto* systemdb = new arangodb::SystemDatabaseFeature(server);
|
||||
|
||||
|
@ -2900,6 +2905,7 @@ TEST_F(IResearchAnalyzerFeatureTest, test_upgrade_static_legacy) {
|
|||
arangodb::aql::OptimizerRulesFeature(this->server).unprepare();
|
||||
});
|
||||
|
||||
auto cleanup = arangodb::scopeGuard([dbFeature](){ dbFeature->unprepare(); });
|
||||
feature->start(); // register upgrade tasks
|
||||
|
||||
arangodb::DatabasePathFeature dbPathFeature(server);
|
||||
|
@ -2956,6 +2962,7 @@ TEST_F(IResearchAnalyzerFeatureTest, test_upgrade_static_legacy) {
|
|||
arangodb::aql::OptimizerRulesFeature(this->server).unprepare();
|
||||
});
|
||||
|
||||
auto cleanup = arangodb::scopeGuard([dbFeature](){ dbFeature->unprepare(); });
|
||||
feature->start(); // register upgrade tasks
|
||||
|
||||
arangodb::DatabasePathFeature dbPathFeature(server);
|
||||
|
@ -3038,6 +3045,7 @@ TEST_F(IResearchAnalyzerFeatureTest, test_upgrade_static_legacy) {
|
|||
});
|
||||
|
||||
feature->start(); // register upgrade tasks
|
||||
auto cleanup = arangodb::scopeGuard([dbFeature](){ dbFeature->unprepare(); });
|
||||
|
||||
// ensure no legacy collection after feature start
|
||||
{
|
||||
|
@ -3099,6 +3107,7 @@ TEST_F(IResearchAnalyzerFeatureTest, test_upgrade_static_legacy) {
|
|||
});
|
||||
|
||||
feature->start(); // register upgrade tasks
|
||||
auto cleanup = arangodb::scopeGuard([dbFeature](){ dbFeature->unprepare(); });
|
||||
|
||||
// ensure no legacy collection after feature start
|
||||
{
|
||||
|
@ -3185,6 +3194,7 @@ TEST_F(IResearchAnalyzerFeatureTest, test_upgrade_static_legacy) {
|
|||
});
|
||||
|
||||
feature->start(); // register upgrade tasks
|
||||
auto cleanup = arangodb::scopeGuard([dbFeature](){ dbFeature->unprepare(); });
|
||||
|
||||
// ensure legacy collection after feature start
|
||||
{
|
||||
|
@ -3261,6 +3271,7 @@ TEST_F(IResearchAnalyzerFeatureTest, test_upgrade_static_legacy) {
|
|||
});
|
||||
|
||||
feature->start(); // register upgrade tasks
|
||||
auto cleanup = arangodb::scopeGuard([dbFeature](){ dbFeature->unprepare(); });
|
||||
|
||||
// ensure no legacy collection after feature start
|
||||
{
|
||||
|
@ -3396,7 +3407,6 @@ TEST_F(IResearchAnalyzerFeatureTest, test_visit) {
|
|||
arangodb::iresearch::IResearchAnalyzerFeature feature(server);
|
||||
arangodb::DatabaseFeature* dbFeature;
|
||||
arangodb::SystemDatabaseFeature* sysDatabase;
|
||||
server.addFeature(new arangodb::QueryRegistryFeature(server)); // required for constructing TRI_vocbase_t
|
||||
server.addFeature(dbFeature = new arangodb::DatabaseFeature(server)); // required for IResearchAnalyzerFeature::emplace(...)
|
||||
server.addFeature(new arangodb::QueryRegistryFeature(server)); // required for constructing TRI_vocbase_t
|
||||
server.addFeature(sysDatabase = new arangodb::SystemDatabaseFeature(server)); // required for IResearchAnalyzerFeature::start()
|
||||
|
@ -3414,6 +3424,8 @@ TEST_F(IResearchAnalyzerFeatureTest, test_visit) {
|
|||
arangodb::tests::AnalyzerCollectionName);
|
||||
}
|
||||
|
||||
auto cleanup = arangodb::scopeGuard([dbFeature](){ dbFeature->unprepare(); });
|
||||
|
||||
arangodb::iresearch::IResearchAnalyzerFeature::EmplaceResult result;
|
||||
EXPECT_TRUE(
|
||||
(true == feature
|
||||
|
@ -3669,11 +3681,11 @@ TEST_F(IResearchAnalyzerFeatureTest, custom_analyzers_vpack_create) {
|
|||
arangodb::iresearch::IResearchAnalyzerFeature feature(server);
|
||||
arangodb::DatabaseFeature* dbFeature;
|
||||
arangodb::SystemDatabaseFeature* sysDatabase;
|
||||
server.addFeature(new arangodb::QueryRegistryFeature(server)); // required for constructing TRI_vocbase_t
|
||||
server.addFeature(dbFeature = new arangodb::DatabaseFeature(server)); // required for IResearchAnalyzerFeature::emplace(...)
|
||||
server.addFeature(new arangodb::QueryRegistryFeature(server)); // required for constructing TRI_vocbase_t
|
||||
server.addFeature(sysDatabase = new arangodb::SystemDatabaseFeature(server)); // required for IResearchAnalyzerFeature::start()
|
||||
server.addFeature(new arangodb::V8DealerFeature(server)); // required for DatabaseFeature::createDatabase(...)
|
||||
auto cleanup = arangodb::scopeGuard([dbFeature](){ dbFeature->unprepare(); });
|
||||
|
||||
// create system vocbase (before feature start)
|
||||
{
|
||||
|
|
|
@ -173,6 +173,8 @@ TEST_F(RestAnalyzerHandlerTest, test_create) {
|
|||
server.addFeature(analyzers = new arangodb::iresearch::IResearchAnalyzerFeature(server)); // required for running upgrade task
|
||||
server.addFeature(sysDatabase = new arangodb::SystemDatabaseFeature(server)); // required for IResearchAnalyzerFeature::start()
|
||||
|
||||
auto cleanup = arangodb::scopeGuard([dbFeature](){ dbFeature->unprepare(); });
|
||||
|
||||
// create system vocbase
|
||||
{
|
||||
auto const databases = arangodb::velocypack::Parser::fromJson(
|
||||
|
@ -617,6 +619,8 @@ TEST_F(RestAnalyzerHandlerTest, test_get) {
|
|||
server.addFeature(analyzers = new arangodb::iresearch::IResearchAnalyzerFeature(server)); // required for running upgrade task
|
||||
analyzers->prepare(); // add static analyzers
|
||||
|
||||
auto cleanup = arangodb::scopeGuard([dbFeature](){ dbFeature->unprepare(); });
|
||||
|
||||
// create system vocbase
|
||||
{
|
||||
auto const databases = arangodb::velocypack::Parser::fromJson(
|
||||
|
@ -988,6 +992,8 @@ TEST_F(RestAnalyzerHandlerTest, test_list) {
|
|||
server.addFeature(sysDatabase = new arangodb::SystemDatabaseFeature(server)); // required for IResearchAnalyzerFeature::start()
|
||||
server.addFeature(analyzers = new arangodb::iresearch::IResearchAnalyzerFeature(server)); // required for running upgrade task
|
||||
|
||||
auto cleanup = arangodb::scopeGuard([dbFeature](){ dbFeature->unprepare(); });
|
||||
|
||||
// create system vocbase
|
||||
{
|
||||
auto const databases = arangodb::velocypack::Parser::fromJson(
|
||||
|
@ -1389,6 +1395,8 @@ TEST_F(RestAnalyzerHandlerTest, test_remove) {
|
|||
server.addFeature(dbFeature = new arangodb::DatabaseFeature(server)); // required for IResearchAnalyzerFeature::emplace(...)
|
||||
server.addFeature(analyzers = new arangodb::iresearch::IResearchAnalyzerFeature(server)); // required for running upgrade task
|
||||
|
||||
auto cleanup = arangodb::scopeGuard([dbFeature](){ dbFeature->unprepare(); });
|
||||
|
||||
// create system vocbase
|
||||
{
|
||||
auto const databases = arangodb::velocypack::Parser::fromJson(
|
||||
|
|
|
@ -208,6 +208,8 @@ TEST_F(V8AnalyzersTest, test_accessors) {
|
|||
server.addFeature(dbFeature = new arangodb::DatabaseFeature(server)); // required for IResearchAnalyzerFeature::emplace(...)
|
||||
server.addFeature(analyzers = new arangodb::iresearch::IResearchAnalyzerFeature(server)); // required for running upgrade task
|
||||
|
||||
auto cleanup = arangodb::scopeGuard([dbFeature](){ dbFeature->unprepare(); });
|
||||
|
||||
// create system vocbase
|
||||
{
|
||||
auto const databases = arangodb::velocypack::Parser::fromJson(
|
||||
|
@ -703,6 +705,8 @@ TEST_F(V8AnalyzersTest, test_create) {
|
|||
server.addFeature(analyzers = new arangodb::iresearch::IResearchAnalyzerFeature(server)); // required for running upgrade task
|
||||
server.addFeature(sysDatabase = new arangodb::SystemDatabaseFeature(server)); // required for IResearchAnalyzerFeature::start()
|
||||
|
||||
auto cleanup = arangodb::scopeGuard([dbFeature](){ dbFeature->unprepare(); });
|
||||
|
||||
// create system vocbase
|
||||
{
|
||||
auto const databases = arangodb::velocypack::Parser::fromJson(
|
||||
|
@ -1288,6 +1292,8 @@ TEST_F(V8AnalyzersTest, test_get) {
|
|||
server.addFeature(analyzers = new arangodb::iresearch::IResearchAnalyzerFeature(server)); // required for running upgrade task
|
||||
analyzers->prepare(); // add static analyzers
|
||||
|
||||
auto cleanup = arangodb::scopeGuard([dbFeature](){ dbFeature->unprepare(); });
|
||||
|
||||
// create system vocbase
|
||||
{
|
||||
auto const databases = arangodb::velocypack::Parser::fromJson(
|
||||
|
@ -1845,7 +1851,9 @@ TEST_F(V8AnalyzersTest, test_list) {
|
|||
*vocbase,
|
||||
arangodb::tests::AnalyzerCollectionName);
|
||||
}
|
||||
|
||||
|
||||
auto cleanup = arangodb::scopeGuard([dbFeature](){ dbFeature->unprepare(); });
|
||||
|
||||
arangodb::iresearch::IResearchAnalyzerFeature::EmplaceResult result;
|
||||
ASSERT_TRUE((analyzers
|
||||
->emplace(result, arangodb::StaticStrings::SystemDatabase + "::testAnalyzer1",
|
||||
|
@ -2290,6 +2298,8 @@ TEST_F(V8AnalyzersTest, test_remove) {
|
|||
server.addFeature(dbFeature = new arangodb::DatabaseFeature(server)); // required for IResearchAnalyzerFeature::emplace(...)
|
||||
server.addFeature(analyzers = new arangodb::iresearch::IResearchAnalyzerFeature(server)); // required for running upgrade task
|
||||
|
||||
auto cleanup = arangodb::scopeGuard([dbFeature](){ dbFeature->unprepare(); });
|
||||
|
||||
// create system vocbase
|
||||
{
|
||||
auto const databases = arangodb::velocypack::Parser::fromJson(
|
||||
|
|
Loading…
Reference in New Issue