leekeiabstraction commented on code in PR #352: URL: https://github.com/apache/fluss-rust/pull/352#discussion_r2830103853
########## bindings/cpp/test/test_utils.h: ########## @@ -0,0 +1,342 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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. + */ + +#pragma once + +#include <gtest/gtest.h> + +#include <algorithm> +#include <chrono> +#include <cstdio> +#include <cstdlib> +#include <cstring> +#include <string> +#include <thread> +#include <vector> + +#ifdef _WIN32 +#include <winsock2.h> +#include <ws2tcpip.h> +#pragma comment(lib, "ws2_32.lib") +#else +#include <arpa/inet.h> +#include <netinet/in.h> +#include <sys/socket.h> +#include <unistd.h> +#endif + +#include "fluss.hpp" + +// Macro to assert Result is OK and print error message on failure +#define ASSERT_OK(result) ASSERT_TRUE((result).Ok()) << (result).error_message +#define EXPECT_OK(result) EXPECT_TRUE((result).Ok()) << (result).error_message + +namespace fluss_test { + +static constexpr const char* kFlussVersion = "0.7.0"; Review Comment: Great question, it would, parameterising server version would be a good approach to take. We'd want to parameterise this across different ITs, within website (for back referencing to main Fluss website) and anywhere else that might be applicable. However I think we can address parameterising as an issue / separate PR. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
