Files
mscclpp/test/unit/utils_internal_tests.cc
2024-10-17 21:25:46 -07:00

21 lines
393 B
C++

// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
#include <gtest/gtest.h>
#include <thread>
#include "utils_internal.hpp"
TEST(UtilsInternalTest, getHostHash) {
uint64_t hash1 = mscclpp::getHostHash();
uint64_t hash2;
std::thread th([&hash2]() { hash2 = mscclpp::getHostHash(); });
ASSERT_TRUE(th.joinable());
th.join();
EXPECT_EQ(hash1, hash2);
}