mirror of https://gitee.com/bigwinds/arangodb
Bug fix/fixed analyzer removal from db (#9359)
* Added missing commit. Updated tests to check actual deletion from db. * Added check for commit result
This commit is contained in:
parent
782cb49105
commit
d561221201
|
@ -2117,6 +2117,11 @@ arangodb::Result IResearchAnalyzerFeature::remove( // remove analyzer
|
|||
|
||||
return result.result;
|
||||
}
|
||||
|
||||
auto commitResult = trx.commit();
|
||||
if (!commitResult.ok()) {
|
||||
return commitResult;
|
||||
}
|
||||
|
||||
_analyzers.erase(itr);
|
||||
} catch (arangodb::basics::Exception const& e) {
|
||||
|
|
|
@ -93,6 +93,7 @@ function iResearchFeatureAqlTestSuite () {
|
|||
|
||||
testAnalyzers: function() {
|
||||
let oldList = analyzers.toArray();
|
||||
let oldListInCollection = db._analyzers.toArray();
|
||||
assertTrue(Array === oldList.constructor);
|
||||
|
||||
// creation
|
||||
|
@ -133,6 +134,8 @@ function iResearchFeatureAqlTestSuite () {
|
|||
analyzers.remove(db._name() + "::testAnalyzer");
|
||||
assertTrue(null === analyzers.analyzer(db._name() + "::testAnalyzer"));
|
||||
assertEqual(oldList.length, analyzers.toArray().length);
|
||||
// check the analyzers collection in database
|
||||
assertEqual(oldListInCollection.length, db._analyzers.toArray().length);
|
||||
},
|
||||
|
||||
testAnalyzersFeatures: function() {
|
||||
|
|
Loading…
Reference in New Issue