style: Add typos pre-commit hook (#2041)

This commit is contained in:
Ayaz Salikhov
2025-04-29 09:59:11 +01:00
committed by GitHub
parent de43be887e
commit af0a8af287
95 changed files with 207 additions and 180 deletions

View File

@@ -31,14 +31,14 @@
namespace {
struct TestScannerAdaper {
TestScannerAdaper(
struct TestScannerAdapter {
TestScannerAdapter(
testing::MockFunction<void(migration::cassandra::impl::TokenRange const&, boost::asio::yield_context)>& func
)
: callback(func) {};
TestScannerAdaper(TestScannerAdaper const&) = default;
TestScannerAdaper(TestScannerAdaper&&) = default;
TestScannerAdapter(TestScannerAdapter const&) = default;
TestScannerAdapter(TestScannerAdapter&&) = default;
std::reference_wrapper<
testing::MockFunction<void(migration::cassandra::impl::TokenRange const&, boost::asio::yield_context)>>
@@ -58,8 +58,8 @@ TEST_F(FullTableScannerAssertTest, workerNumZero)
{
testing::MockFunction<void(migration::cassandra::impl::TokenRange const&, boost::asio::yield_context)> mockCallback;
EXPECT_CLIO_ASSERT_FAIL_WITH_MESSAGE(
migration::cassandra::impl::FullTableScanner<TestScannerAdaper>(
{.ctxThreadsNum = 1, .jobsNum = 0, .cursorsPerJob = 100}, TestScannerAdaper(mockCallback)
migration::cassandra::impl::FullTableScanner<TestScannerAdapter>(
{.ctxThreadsNum = 1, .jobsNum = 0, .cursorsPerJob = 100}, TestScannerAdapter(mockCallback)
),
".*jobsNum for full table scanner must be greater than 0"
);
@@ -69,8 +69,8 @@ TEST_F(FullTableScannerAssertTest, cursorsPerWorkerZero)
{
testing::MockFunction<void(migration::cassandra::impl::TokenRange const&, boost::asio::yield_context)> mockCallback;
EXPECT_CLIO_ASSERT_FAIL_WITH_MESSAGE(
migration::cassandra::impl::FullTableScanner<TestScannerAdaper>(
{.ctxThreadsNum = 1, .jobsNum = 1, .cursorsPerJob = 0}, TestScannerAdaper(mockCallback)
migration::cassandra::impl::FullTableScanner<TestScannerAdapter>(
{.ctxThreadsNum = 1, .jobsNum = 1, .cursorsPerJob = 0}, TestScannerAdapter(mockCallback)
),
".*cursorsPerJob for full table scanner must be greater than 0"
);
@@ -82,8 +82,8 @@ TEST_F(FullTableScannerTests, SingleThreadCtx)
{
testing::MockFunction<void(migration::cassandra::impl::TokenRange const&, boost::asio::yield_context)> mockCallback;
EXPECT_CALL(mockCallback, Call(testing::_, testing::_)).Times(100);
auto scanner = migration::cassandra::impl::FullTableScanner<TestScannerAdaper>(
{.ctxThreadsNum = 1, .jobsNum = 1, .cursorsPerJob = 100}, TestScannerAdaper(mockCallback)
auto scanner = migration::cassandra::impl::FullTableScanner<TestScannerAdapter>(
{.ctxThreadsNum = 1, .jobsNum = 1, .cursorsPerJob = 100}, TestScannerAdapter(mockCallback)
);
scanner.wait();
}
@@ -92,8 +92,8 @@ TEST_F(FullTableScannerTests, MultipleThreadCtx)
{
testing::MockFunction<void(migration::cassandra::impl::TokenRange const&, boost::asio::yield_context)> mockCallback;
EXPECT_CALL(mockCallback, Call(testing::_, testing::_)).Times(200);
auto scanner = migration::cassandra::impl::FullTableScanner<TestScannerAdaper>(
{.ctxThreadsNum = 2, .jobsNum = 2, .cursorsPerJob = 100}, TestScannerAdaper(mockCallback)
auto scanner = migration::cassandra::impl::FullTableScanner<TestScannerAdapter>(
{.ctxThreadsNum = 2, .jobsNum = 2, .cursorsPerJob = 100}, TestScannerAdapter(mockCallback)
);
scanner.wait();
}
@@ -107,8 +107,8 @@ TEST_F(FullTableScannerTests, RangeSizeIsOne)
{
testing::MockFunction<void(migration::cassandra::impl::TokenRange const&, boost::asio::yield_context)> mockCallback;
EXPECT_CALL(mockCallback, Call(rangeMinMax(), testing::_)).Times(1);
auto scanner = migration::cassandra::impl::FullTableScanner<TestScannerAdaper>(
{.ctxThreadsNum = 2, .jobsNum = 1, .cursorsPerJob = 1}, TestScannerAdaper(mockCallback)
auto scanner = migration::cassandra::impl::FullTableScanner<TestScannerAdapter>(
{.ctxThreadsNum = 2, .jobsNum = 1, .cursorsPerJob = 1}, TestScannerAdapter(mockCallback)
);
scanner.wait();
}