Skip to content
Snippets Groups Projects
Commit 22cd2713 authored by Sergey Yakubov's avatar Sergey Yakubov
Browse files

fix build and test

parent 59e0cfe5
No related branches found
No related tags found
No related merge requests found
......@@ -12,7 +12,7 @@
#if defined(__GNUC__) || defined(__clang__)
#define DEPRECATED(msg) __attribute__((deprecated(msg)))
#elif defined(_MSC_VER)
#define DEPRECATED __declspec(deprecated(msg))
#define DEPRECATED(msg) __declspec(deprecated(msg))
#else
#pragma message("WARNING: You need to implement DEPRECATED for this compiler")
#define DEPRECATED(msg)
......
......@@ -112,8 +112,8 @@ class Producer {
\param callback - callback function
\return Error - will be nullptr on success
*/
virtual Error SendMetadata(const std::string& metadata,
RequestCallback callback) DEPRECATED("obsolates 01.07.2022, use SendBeamtimeMetadata instead") = 0;
virtual Error DEPRECATED("obsolates 01.07.2022, use SendBeamtimeMetadata instead") SendMetadata(const std::string& metadata,
RequestCallback callback) = 0;
//! Sends beamtime metadata to the receiver
/*!
......
......@@ -347,13 +347,14 @@ TEST_F(ProducerImplTests, OKAddingSendStreamDataRequest) {
expected_size = expected_metadata.size();
expected_ingest_mode = asapo::IngestModeFlags::kTransferData | asapo::IngestModeFlags::kStoreInDatabase ;
std::string expected_message = (std::string(expected_stream) + ".meta");
producer.SetCredentials(expected_credentials);
EXPECT_CALL(mock_pull, AddRequest_t(M_CheckSendRequest(asapo::kOpcodeTransferMetaData,
expected_credentials_str,
"",
expected_id,
expected_size,
(std::string(expected_stream) + ".meta").c_str(),
expected_message.c_str(),
expected_stream,
expected_ingest_mode,
1,
......
......@@ -46,14 +46,14 @@ int main(int argc, char* argv[]) {
}
auto mode = asapo::MetaIngestMode{asapo::MetaIngestOp::kReplace, true};
auto err = db.Insert("meta", 0, reinterpret_cast<const uint8_t*>(json.c_str()), json.size(), mode);
auto err = db.Insert("meta", "0", reinterpret_cast<const uint8_t*>(json.c_str()), json.size(), mode);
if (err) {
std::cout << err->Explain() << std::endl;
}
Assert(err, args.keyword);
err = db.Insert("meta", 0, reinterpret_cast<const uint8_t*>(json.c_str()), json.size(), mode);
err = db.Insert("meta", "0", reinterpret_cast<const uint8_t*>(json.c_str()), json.size(), mode);
if (err) {
std::cout << err->Explain() << std::endl;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment