aboutsummaryrefslogtreecommitdiffstats
path: root/documentapi/src/tests
Commit message (Collapse)AuthorAgeFilesLines
* remove TEST_SETUP macro and update testsHåvard Pettersen6 days2-18/+8
|
* Rename documentapi library to vespa_documentapi.Tor Egge8 days7-7/+7
|
* Rewrite document api routable factory unit test to gtest.Tor Egge2024-06-032-34/+16
|
* Propagate "create if missing"-flag outside binary Update payload in protocolsTor Brede Vekterli2024-04-262-2/+52
| | | | | | | | | | | | | | | | | | | | Avoids potentially having to deserialize the entire update just to get to a single bit of information that is technically metadata existing orthogonally to the document update itself. To ensure backwards/forwards compatibility, the flag is propagated as a Protobuf `enum` where the default value is a special "unspecified" sentinel, implying an old sender. Since the Java protocol implementation always eagerly deserializes messages, it unconditionally assigns the `create_if_missing` field when sending and completely ignores it when receiving. The C++ protocol implementation observes and propagates the field iff set. Otherwise the flag is deferred to the update object as before. This applies to both the DocumentAPI and StorageAPI protocols.
* Merge pull request #30547 from ↵Tor Egge2024-03-112-182/+124
|\ | | | | | | | | vespa-engine/toregge/rewrite-documentapi-policies-unit-test-to-gtest Rewrite documentapi policies unit test to gtest.
| * Fix typo in documentapi policies unit test.Tor Egge2024-03-111-1/+1
| |
| * Rewrite documentapi policies unit test to gtest.Tor Egge2024-03-092-182/+124
| |
* | Merge pull request #30552 from ↵Geir Storli2024-03-112-89/+33
|\ \ | | | | | | | | | | | | vespa-engine/toregge/rewrite-documentapi-replymerger-unit-test-to-gtest Rewrite documentapi reply merger unit test to gtest.
| * | Rewrite documentapi reply merger unit test to gtest.Tor Egge2024-03-092-89/+33
| |/
* / Rewrite documentapi messagebus unit test to gtest.Tor Egge2024-03-092-36/+35
|/
* Include file names in IO failure exceptionsTor Brede Vekterli2024-02-221-2/+2
|
* Move C++ DocumentAPI message tests to GTestTor Brede Vekterli2024-02-2211-1359/+867
| | | | | | | | | | | | Message-specific test cases are no longer delegated to a quasi-framework in a parent class, but implemented with regular test case functions. Clean up and move existing `TestBase` into a dedicated `MessageFixture` class. Use `std::filesystem::path` instead of plain strings for file paths. This also merges 3 standalone test apps into 1 GTest runner.
* Tag Protobuf protocol boundary version and add binary test filesTor Brede Vekterli2024-02-211-1/+1
| | | | | | | All _reported_ versions >= 8.310 use Protobuf protocol, all lower versions use the legacy protocol. Reported version is controlled by an environment variable and defaults to 8.309, i.e. the legacy version.
* Add new Protobuf-based MessageBus DocumentAPI protocolTor Brede Vekterli2024-02-166-46/+940
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds an entirely new implementation of the internal MessageBus DocumentAPI protocol, which shall be functionally 1-to-1 compatible with the existing legacy protocol. New protobuf schemas have been added to the top-level documentapi module, which are separated into different domains of responsibility: * CRUD messages * Visiting messages * Data inspection messages As well as a schema for shared, common message types. Both C++ and Java protocol implementations separate serialization and deserialization into a codec abstraction per message type, which hides the boilerplate required for Protobuf buffer management. The Java version is a tad more verbose due to generics type-erasure. This protocol does _not_ currently support lazy (de-)serialization in Java, as the existing mechanisms for doing so are inherently tied to the legacy protocol version. Performance tests will decide if we need to introduce such functionality to the new protocol version. To avoid having the new protocol go live in production, this commit changes the semantics of how MessageBus version reporting works (at least for the near future); instead of reporting the current Vespa _release_ version, it reports the highest supported _protocol_ version. This lets us conditionally enable the new protocol by reporting a MessageBus version greater than or equal to the protocol version _iff_ the protocol should be active. The new protocol is disabled by default. Other changes: * Protocol tests have been moved up one package directory level to be aligned with the actual package of the classes they test. This allows for using package-protected constructors in the serialization tests. * `DocumentDeserializer` now exposes the underlying document type repo/manager. This is done to detangle `Document`/`DocumentUpdate` deserialization from the underlying wire buffer management. * `RemoveLocationMessage` at long last contains a bucket space, which was forgotten when we initially added this concept to the other messages, and where the pain of adding it in later was too big (not so anymore!). Unit tests for both C++ and Java have been hoisted from the legacy test suite, cleaned up and extended with additional cases. The C++ tests use the old unit test kit and should receive a good follow-up washing and GTest-rewrite. **Important**: due to how MessageBus protocol versioning works, the final protocol version is _not_ yet decided, as setting it requires syncing against our build systems. A follow-up commit will assign the final version as well as include all required binary test files.
* Improve thread safety of MessageBus ContentPolicyTor Brede Vekterli2023-10-171-5/+5
| | | | | | | | | Updates of distribution config and cached cluster state are now both thread safe. Move to `shared_ptr` to allow for taking immutable strong refs. Also remove pointless two-phased config switch-over in favor of directly updating value inside lock.
* Update copyrightJon Bratseth2023-10-0921-21/+21
|
* Use std::filesystem::is_directory and std::filesystem::existsTor Egge2023-07-201-2/+2
|
* Deserialize match features in SearchResult used in streaming search.Geir Storli2023-05-021-1/+5
|
* Serialize match features in vdslib::SearchResult.Tor Egge2023-04-281-0/+48
|
* Remove (SearchResult|DocumentSummary)(Command|Reply) storage and documentapi ↵Tor Egge2023-04-212-204/+0
| | | | messages.
* add create-if-non-existent flag for document putHåvard Pettersen2023-04-193-8/+67
|
* Reduce creation of Document instances without DocumentTypeRepo.Geir Storli2023-03-132-11/+14
|
* - Use T && f() && to avoid moving temporaries.Henning Baldersheim2023-02-031-2/+2
| | | | - std::make_unique/make_shared
* - Deinline destructor.Henning Baldersheim2023-02-012-84/+75
| | | | | | - Move instead of copy = > noexcept move construtors. - make_unique/make_shared. - c++11 for loops
* deinline destructors.Henning Baldersheim2023-02-011-2/+2
|
* Change from typedef to using in documentapi C++ code.Geir Storli2022-12-211-1/+1
|
* Make load balancer thread safe.Henning Baldersheim2022-06-301-4/+2
|
* cleanup unused second pass statsArne H Juul2022-06-081-4/+0
|
* CloneablePtr -> std::unique_ptrHenning Baldersheim2022-03-291-2/+1
|
* Update tests to take vespalib::string size into accountTor Brede Vekterli2022-03-241-1/+1
|
* Reduce visibility of document::DocumentHenning Baldersheim2022-03-072-1/+2
|
* Remove inlining warnings (documentapi).Tor Egge2022-02-261-0/+8
|
* Ensure that internal state of ExternSlobrokPolicy and ExternPolicy is ↵Henning Baldersheim2022-02-231-4/+3
| | | | consistent with respect to transport, supervisor, and mirror.
* Don't set deprecated fields when aggregating visitor statisticsTor Brede Vekterli2022-01-311-2/+2
| | | | | | | | The 1st/2nd pass functionality has been deprecated for a long time, but unfortunately the documents/bytes visited stats have been wired to be returned as part of 2nd phase statistics instead of the regular higher-level fields. This commit changes this, but the serialization will still have to remain in place until Vespa 8.
* more descriptive name for header fileArne H Juul2021-12-023-3/+3
|
* track namespace move in documenttypes.defArne H Juul2021-12-023-0/+3
| | | | | | | * For C++ code this introduces a "document::config" namespace, which will sometimes conflict with the global "config" namespace. * Move all forward-declarations of the types DocumenttypesConfig and DocumenttypesConfigBuilder to a common header file.
* Update 2018 copyright notices.gjoranv2021-10-073-3/+3
|
* Update 2017 copyright notices.gjoranv2021-10-0718-18/+18
|
* Use vespalib::duration for timeoutsHenning Baldersheim2021-01-311-1/+1
|
* Revert "Revert "Jonmv/remove storage policy""Jon Marius Venstad2021-01-051-24/+24
| | | | This reverts commit 75b2e4c11ea6463c335f1c77dab3fdb5493e5600.
* Revert "Jonmv/remove storage policy"Jon Marius Venstad2021-01-051-24/+24
|
* Merge storagepolicy into contentpolicyJon Marius Venstad2020-12-301-24/+24
|
* GC LoadTypeSetHenning Baldersheim2020-11-2711-128/+24
|
* Remove load type from documentapi interface.Henning Baldersheim2020-11-241-5/+2
|
* Use std::string for selection as that is required for parsing and as it has ↵Henning Baldersheim2020-11-231-3/+8
| | | | a smaller memory footprint.
* - Reorder members for compactness.Henning Baldersheim2020-11-232-2/+10
| | | | | - Avoid needing the definition of Error everywhere. - use std::make_xxx and other c++11 constructs.
* Remove disk distribution from C++ part of vdslib.Tor Egge2020-11-051-6/+1
|
* Use named constants instead of strings sprinkled all over.Henning Baldersheim2020-08-041-4/+4
|
* Consolidate search for GTest.Tor Egge2020-07-071-1/+0
|
* Use find_package to find gtest library.Tor Egge2020-06-291-1/+2
|