From 8148d73c033f3d5c0ddb0a358db5d2e6bd9cb51a Mon Sep 17 00:00:00 2001 From: jsteemann Date: Thu, 17 Mar 2016 00:36:34 +0100 Subject: [PATCH 1/3] removed some more Shaper --- arangod/VocBase/DocumentAccessor.cpp | 2 ++ arangod/VocBase/DocumentAccessor.h | 34 ---------------------- arangod/VocBase/Shaper.h | 43 ---------------------------- 3 files changed, 2 insertions(+), 77 deletions(-) delete mode 100644 arangod/VocBase/Shaper.h diff --git a/arangod/VocBase/DocumentAccessor.cpp b/arangod/VocBase/DocumentAccessor.cpp index 11c0f015cd..1dbb80d3eb 100644 --- a/arangod/VocBase/DocumentAccessor.cpp +++ b/arangod/VocBase/DocumentAccessor.cpp @@ -308,6 +308,7 @@ void DocumentAccessor::lookupDocumentAttribute(char const* name, return; } +#if 0 if (name[1] == 'r' && nameLength == 4 && memcmp(name, TRI_VOC_ATTRIBUTE_REV, nameLength) == 0) { // _rev @@ -322,6 +323,7 @@ void DocumentAccessor::lookupDocumentAttribute(char const* name, _current = _json.get(); return; } +#endif #if 0 // TODO diff --git a/arangod/VocBase/DocumentAccessor.h b/arangod/VocBase/DocumentAccessor.h index 440900f06e..6580a9c487 100644 --- a/arangod/VocBase/DocumentAccessor.h +++ b/arangod/VocBase/DocumentAccessor.h @@ -28,7 +28,6 @@ #include "Basics/JsonHelper.h" #include "Utils/Transaction.h" #include "VocBase/document-collection.h" -#include "VocBase/Shaper.h" #include "Wal/Marker.h" #include @@ -123,37 +122,4 @@ static inline std::string TRI_EXTRACT_MARKER_KEY(arangodb::Transaction* trx, trx, static_cast(mptr->getDataPtr())); } -//////////////////////////////////////////////////////////////////////////////// -/// @brief extracts the revision id from a marker -//////////////////////////////////////////////////////////////////////////////// - -static inline TRI_voc_rid_t TRI_EXTRACT_MARKER_RID( - arangodb::Transaction*, TRI_df_marker_t const* marker) { -#if 0 - if (marker->_type == TRI_WAL_MARKER_VPACK_DOCUMENT) { - auto b = reinterpret_cast(marker) + - sizeof(arangodb::wal::vpack_document_marker_t); - VPackSlice slice(reinterpret_cast(b)); - VPackSlice value = slice.get(TRI_VOC_ATTRIBUTE_REV); - return arangodb::velocypack::readUInt64(value.start() + 1); - } - -#ifdef ARANGODB_ENABLE_MAINTAINER_MODE - // invalid marker type - TRI_ASSERT(false); -#endif -#endif - return 0; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief extracts the revision id from a master pointer -//////////////////////////////////////////////////////////////////////////////// - -static inline TRI_voc_rid_t TRI_EXTRACT_MARKER_RID(arangodb::Transaction* trx, - TRI_doc_mptr_t const* mptr) { - return TRI_EXTRACT_MARKER_RID( - trx, static_cast(mptr->getDataPtr())); -} - #endif diff --git a/arangod/VocBase/Shaper.h b/arangod/VocBase/Shaper.h deleted file mode 100644 index b0ca9f6231..0000000000 --- a/arangod/VocBase/Shaper.h +++ /dev/null @@ -1,43 +0,0 @@ -//////////////////////////////////////////////////////////////////////////////// -/// DISCLAIMER -/// -/// Copyright 2014-2016 ArangoDB GmbH, Cologne, Germany -/// Copyright 2004-2014 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 GmbH, Cologne, Germany -/// -/// @author Dr. Frank Celler -/// @author Martin Schoenert -//////////////////////////////////////////////////////////////////////////////// - -#ifndef ARANGOD_VOC_BASE_SHAPER_H -#define ARANGOD_VOC_BASE_SHAPER_H 1 - -#include "Basics/Common.h" - -//////////////////////////////////////////////////////////////////////////////// -/// @brief json shaper -//////////////////////////////////////////////////////////////////////////////// - -class Shaper { - public: - Shaper(Shaper const&) = delete; - Shaper& operator=(Shaper const&) = delete; - Shaper() {} - virtual ~Shaper() {} - -}; - -#endif From c710168e5c5faec85a97e6aa213337e4c58ea1a1 Mon Sep 17 00:00:00 2001 From: jsteemann Date: Thu, 17 Mar 2016 01:02:35 +0100 Subject: [PATCH 2/3] removed unused parts --- UnitTests/Basics/structure-size-test.cpp | 1 - arangod/VocBase/document-collection.h | 24 ------------------------ arangod/VocBase/vocbase.h | 4 ++-- 3 files changed, 2 insertions(+), 27 deletions(-) diff --git a/UnitTests/Basics/structure-size-test.cpp b/UnitTests/Basics/structure-size-test.cpp index 200a4a4eb8..66c6855cf6 100644 --- a/UnitTests/Basics/structure-size-test.cpp +++ b/UnitTests/Basics/structure-size-test.cpp @@ -29,7 +29,6 @@ #include "arangod/VocBase/datafile.h" #include "arangod/VocBase/document-collection.h" -#include "arangod/VocBase/VocShaper.h" #include "arangod/Wal/Marker.h" template size_t offsetOf (U T::*member) { diff --git a/arangod/VocBase/document-collection.h b/arangod/VocBase/document-collection.h index 51603843a5..64a72178d0 100644 --- a/arangod/VocBase/document-collection.h +++ b/arangod/VocBase/document-collection.h @@ -25,7 +25,6 @@ #define ARANGOD_VOC_BASE_DOCUMENT_COLLECTION_H 1 #include "Basics/Common.h" -#include "Basics/fasthash.h" #include "Basics/ReadWriteLock.h" #include "Cluster/ClusterInfo.h" #include "VocBase/collection.h" @@ -39,7 +38,6 @@ namespace arangodb { class EdgeIndex; -class ExampleMatcher; class Index; class KeyGenerator; class OperationOptions; @@ -456,28 +454,6 @@ static inline TRI_voc_cid_t TRI_EXTRACT_MARKER_TO_CID( return TRI_EXTRACT_MARKER_TO_CID(marker); } -//////////////////////////////////////////////////////////////////////////////// -/// @brief extracts the revision id from a marker -//////////////////////////////////////////////////////////////////////////////// - -static inline TRI_voc_rid_t TRI_EXTRACT_MARKER_RID( - TRI_df_marker_t const* marker) { - // invalid marker type - TRI_ASSERT(false); - - return 0; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief extracts the revision id from a master pointer -//////////////////////////////////////////////////////////////////////////////// - -static inline TRI_voc_rid_t TRI_EXTRACT_MARKER_RID(TRI_doc_mptr_t const* mptr) { - TRI_df_marker_t const* marker = - static_cast(mptr->getDataPtr()); - return TRI_EXTRACT_MARKER_RID(marker); -} - //////////////////////////////////////////////////////////////////////////////// /// @brief extracts the pointer to the key from a marker //////////////////////////////////////////////////////////////////////////////// diff --git a/arangod/VocBase/vocbase.h b/arangod/VocBase/vocbase.h index 331f479daf..467c42358f 100644 --- a/arangod/VocBase/vocbase.h +++ b/arangod/VocBase/vocbase.h @@ -314,7 +314,7 @@ struct TRI_vocbase_t { /// in this enum for compatibility with earlier versions //////////////////////////////////////////////////////////////////////////////// -typedef enum { +enum TRI_vocbase_col_status_e { TRI_VOC_COL_STATUS_CORRUPTED = 0, TRI_VOC_COL_STATUS_NEW_BORN = 1, // DEPRECATED, and shouldn't be used anymore TRI_VOC_COL_STATUS_UNLOADED = 2, @@ -322,7 +322,7 @@ typedef enum { TRI_VOC_COL_STATUS_UNLOADING = 4, TRI_VOC_COL_STATUS_DELETED = 5, TRI_VOC_COL_STATUS_LOADING = 6 -} TRI_vocbase_col_status_e; +}; //////////////////////////////////////////////////////////////////////////////// /// @brief collection container From ca59be449fb535e5309d9a640c5db0de30bbf86f Mon Sep 17 00:00:00 2001 From: Frank Celler Date: Thu, 17 Mar 2016 09:33:57 +0100 Subject: [PATCH 3/3] added server_http --- js/client/modules/@arangodb/testing.js | 42 +++++++++++++++++++------- 1 file changed, 31 insertions(+), 11 deletions(-) diff --git a/js/client/modules/@arangodb/testing.js b/js/client/modules/@arangodb/testing.js index 96cff3414f..c200f5fcf5 100644 --- a/js/client/modules/@arangodb/testing.js +++ b/js/client/modules/@arangodb/testing.js @@ -39,7 +39,8 @@ const functionsDocumentation = { "dfdb": "start test", "foxx_manager": "foxx manager tests", "http_replication": "http replication tests", - "http_server": "http server tests", + "http_server": "http server tests in Ruby", + "server_http" : "http server tests in Mocha", "importing": "import tests", "recovery": "run recovery tests", "replication_ongoing": "replication ongoing tests", @@ -1982,6 +1983,14 @@ function findTests() { return fs.join(makePathUnix("js/server/perftests"), x); }).sort(); + testsCases.server_http = _.filter(fs.list(makePathUnix("js/common/tests/http")), + function(p) { + return p.substr(-3) === ".js"; + }).map( + function(x) { + return fs.join(makePathUnix("js/common/tests/http"), x); + }).sort(); + testsCases.replication = _.filter(fs.list(makePathUnix("js/common/tests/replication")), function(p) { return p.substr(-3) === ".js"; @@ -2095,6 +2104,7 @@ let allTests = [ "dfdb", "http_server", "importing", + "server_http", "shell_client", "shell_server", "shell_server_aql", @@ -2983,7 +2993,7 @@ testFuncs.foxx_manager = function(options) { }; //////////////////////////////////////////////////////////////////////////////// -/// @brief TEST: http replication +/// @brief TEST: http_replication //////////////////////////////////////////////////////////////////////////////// testFuncs.http_replication = function(options) { @@ -2996,7 +3006,7 @@ testFuncs.http_replication = function(options) { }; //////////////////////////////////////////////////////////////////////////////// -/// @brief TEST: http server +/// @brief TEST: http_server //////////////////////////////////////////////////////////////////////////////// testFuncs.http_server = function(options) { @@ -3482,7 +3492,7 @@ testFuncs.shell_replication = function(options) { }; //////////////////////////////////////////////////////////////////////////////// -/// @brief TEST: shell client +/// @brief TEST: shell_client //////////////////////////////////////////////////////////////////////////////// testFuncs.shell_client = function(options) { @@ -3556,7 +3566,17 @@ testFuncs.shell_client = function(options) { }; //////////////////////////////////////////////////////////////////////////////// -/// @brief TEST: shell server +/// @brief TEST: shell_http +//////////////////////////////////////////////////////////////////////////////// + +testFuncs.server_http = function(options) { + findTests(); + + return performTests(options, testsCases.server_http, 'server_http'); +}; + +//////////////////////////////////////////////////////////////////////////////// +/// @brief TEST: shell_server //////////////////////////////////////////////////////////////////////////////// testFuncs.shell_server = function(options) { @@ -3566,7 +3586,7 @@ testFuncs.shell_server = function(options) { }; //////////////////////////////////////////////////////////////////////////////// -/// @brief TEST: shell server aql +/// @brief TEST: shell_server_aql //////////////////////////////////////////////////////////////////////////////// testFuncs.shell_server_aql = function(options) { @@ -3592,7 +3612,7 @@ testFuncs.shell_server_aql = function(options) { }; //////////////////////////////////////////////////////////////////////////////// -/// @brief TEST: shell server only +/// @brief TEST: shell_server_only //////////////////////////////////////////////////////////////////////////////// testFuncs.shell_server_only = function(options) { @@ -3602,7 +3622,7 @@ testFuncs.shell_server_only = function(options) { }; //////////////////////////////////////////////////////////////////////////////// -/// @brief TEST: shell server performance +/// @brief TEST: shell_server_perf //////////////////////////////////////////////////////////////////////////////// testFuncs.shell_server_perf = function(options) { @@ -3613,7 +3633,7 @@ testFuncs.shell_server_perf = function(options) { }; //////////////////////////////////////////////////////////////////////////////// -/// @brief TEST: single client +/// @brief TEST: single_client //////////////////////////////////////////////////////////////////////////////// function single_usage(testsuite, list) { @@ -3685,7 +3705,7 @@ testFuncs.single_client = function(options) { }; //////////////////////////////////////////////////////////////////////////////// -/// @brief TEST: single server +/// @brief TEST: single_server //////////////////////////////////////////////////////////////////////////////// testFuncs.single_server = function(options) { @@ -3743,7 +3763,7 @@ testFuncs.single_server = function(options) { }; //////////////////////////////////////////////////////////////////////////////// -/// @brief TEST: https server +/// @brief TEST: ssl_server //////////////////////////////////////////////////////////////////////////////// testFuncs.ssl_server = function(options) {