-
Notifications
You must be signed in to change notification settings - Fork 853
protoype for forceOneShardAttributeValue #14707
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
b6eb49d
[3.8] Lower priority of AQL lanes (#14699)
goedderz fc248f7
added a test for statistics behavior (#14703)
jsteemann 24bc4c2
properly rename test file (#14705)
jsteemann 5d742cd
protoype for forceOneShardAttributeValue
jsteemann 0583b76
Merge branch '3.8' into feature-3.8/forceOneShardAttributeValue
jsteemann c6156e5
only enable restrictedShards in case one shard rule got active
hkernbach 7f07d10
fixed getResponsibleShards usage
hkernbach f7e42b0
do not check single boolean twice :)
hkernbach 76790f7
changelog
hkernbach f92db29
Merge branch '3.8' of github.com:arangodb/arangodb into feature-3.8/f…
jsteemann 5861a1d
Merge branch 'feature-3.8/forceOneShardAttributeValue' of github.com:…
jsteemann e371f7a
Update CHANGELOG
jsteemann a000f73
Update CHANGELOG
KVS85 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
added a test for statistics behavior (#14703)
- Loading branch information
commit fc248f727a40584e15404c94ddd3d36f067cad01
There are no files selected for viewing
88 changes: 88 additions & 0 deletions
88
tests/js/client/server_parameters/test-statistics-enabled-false.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
/*jshint globalstrict:false, strict:false */ | ||
/* global getOptions, assertEqual, assertTrue, arango */ | ||
|
||
//////////////////////////////////////////////////////////////////////////////// | ||
/// @brief test for security-related server options | ||
/// | ||
/// @file | ||
/// | ||
/// DISCLAIMER | ||
/// | ||
/// Copyright 2010-2012 triagens GmbH, Cologne, Germany | ||
/// | ||
/// Licensed under the Apache License, Version 2.0 (the "License"); | ||
/// you may not use this file except in compliance with the License. | ||
/// You may obtain a copy of the License at | ||
/// | ||
/// http://www.apache.org/licenses/LICENSE-2.0 | ||
/// | ||
/// Unless required by applicable law or agreed to in writing, software | ||
/// distributed under the License is distributed on an "AS IS" BASIS, | ||
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
/// See the License for the specific language governing permissions and | ||
/// limitations under the License. | ||
/// | ||
/// Copyright holder is ArangoDB Inc, Cologne, Germany | ||
/// | ||
/// @author Jan Steemann | ||
/// @author Copyright 2019, ArangoDB Inc, Cologne, Germany | ||
//////////////////////////////////////////////////////////////////////////////// | ||
|
||
if (getOptions === true) { | ||
return { | ||
'server.statistics': "false", | ||
'server.export-metrics-api': "true", | ||
}; | ||
} | ||
|
||
const jsunity = require('jsunity'); | ||
|
||
function testSuite() { | ||
return { | ||
testGetAdminStatistics : function() { | ||
let res = arango.GET("/_admin/statistics"); | ||
assertTrue(res.error); | ||
assertEqual(404, res.code); | ||
}, | ||
|
||
testGetAdminStatisticsDescription : function() { | ||
let res = arango.GET("/_admin/statistics-description"); | ||
assertTrue(res.error); | ||
assertEqual(404, res.code); | ||
}, | ||
|
||
testGetMetrics : function() { | ||
let metrics = {}; | ||
String(arango.GET("/_admin/metrics/v2")) | ||
.split("\n") | ||
.filter((line) => line.match(/^[^#]/)) | ||
.filter((line) => line.match(/^arangodb_/)) | ||
.forEach((line) => { | ||
let name = line.replace(/[ \{].*$/g, ''); | ||
let value = Number(line.replace(/^.+ (\d+)$/, '$1')); | ||
metrics[name] = value; | ||
}); | ||
|
||
const expected = [ | ||
"arangodb_process_statistics_minor_page_faults_total", | ||
"arangodb_process_statistics_major_page_faults_total", | ||
"arangodb_process_statistics_user_time", | ||
"arangodb_process_statistics_system_time", | ||
"arangodb_process_statistics_number_of_threads", | ||
"arangodb_process_statistics_resident_set_size", | ||
"arangodb_process_statistics_resident_set_size_percent", | ||
"arangodb_process_statistics_virtual_memory_size", | ||
"arangodb_server_statistics_physical_memory", | ||
"arangodb_server_statistics_server_uptime_total", | ||
]; | ||
|
||
expected.forEach((name) => { | ||
assertTrue(metrics.hasOwnProperty(name), name); | ||
assertEqual("number", typeof metrics[name], name); | ||
}); | ||
}, | ||
}; | ||
} | ||
|
||
jsunity.run(testSuite); | ||
return jsunity.done(); |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.