-
Notifications
You must be signed in to change notification settings - Fork 853
implement a global deadline when running testcode in the local arangosh #11123
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 < 10000 /p>
Conversation
… in the local arangosh that also runs the test framework
…out-run-in-local-arangosh
The mixture of double (seconds), double (millisconds), chrono::duration<dobule>, chrono::milliseconds, etc. should be cleaned up!!!
1128ac7
to
6d222ec
Compare
The results of this can be observed by specifying a small timeout:
|
…out-run-in-local-arangosh
…out-run-in-local-arangosh
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove the code using __cpp_lib_chrono
as it is a c++20 feature. The Mac and Windows compilers are not broken, but just support the c++17 standard.
…ngodb/arangodb into feature/timout-run-in-local-arangosh
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not understand how you restricted it to arangosh
only. Fox example isExecutionDeadlineReached
is used in JS_Download
which is used in server and client?!
You use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You use double
, uint64_t
and chrono types
in this PR. I think chrono should be used for all instances, because it is the only type that encodes the expected time unit.
lib/V8/v8-utils.cpp
Outdated
//////////////////////////////////////////////////////////////////////////////// | ||
/// @brief set a point in time after which we will abort external connection | ||
//////////////////////////////////////////////////////////////////////////////// | ||
static double executionDeadline = 0.0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
double
lib/V8/v8-utils.cpp
Outdated
return delta; | ||
} | ||
|
||
std::chrono::milliseconds correctTimeoutToExecutionDeadline(std::chrono::milliseconds timeout) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
std::chrono::milliseconds
Again - we may fix the usage of chrono once we do this for js_download. its out of scope for this PR. |
Just use chrono for your new code and cast to others as required. |
I (we) did, on all places that already use it. |
tests green. |
…out-run-in-local-arangosh
tests all blue. |
Co-Authored-By: Jan <jsteemann@users.noreply.github.com>
Co-Authored-By: Jan <jsteemann@users.noreply.github.com>
Co-Authored-By: Jan <jsteemann@users.noreply.github.com>
Co-Authored-By: Jan <jsteemann@users.noreply.github.com>
Co-Authored-By: Jan <jsteemann@users.noreply.github.com>
…out-run-in-local-arangosh
…out-run-in-local-arangosh
…-fix/validation-fixes-and-improvements * 'devel' of https://github.com/arangodb/arangodb: (25 commits) Do not instantiate snipped if not collection is found on the server. (#11281) Add entries related to search features in 3.7 fix bug (#11279) Docs: Add DocuBlocks for document validation. (#11228) Feature/ngram similarity function (#11276) Fixed production check, removed assertion (#11273) fix compile warning Cluster Metrics (#11234) Feature/satellite graphs (#11015) fix newly created supervision bug with incremental updates (#11269) remove useless std::cout output fix yet more compile warnings Implement memory detection override. (#11268) implement a global deadline when running testcode in the local arangosh (#11123) Encryption key rotation (#11080) fix compile warnings fix compile warnings Feature/aql subquery execution block impl execute implementation (#10606) missing metrics (#10625) Bug fix/supervision server cleanup (#11187) ...
this enables us to have a timeout for testfiles that we eval' into the testing.js arangosh by
runInLocalArangosh
.