Skip to content

Commit

Permalink
fix for clang-tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
thawk105 committed Jul 19, 2023
1 parent 12935eb commit fc42b91
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class tsurugi_issue313_2 : public ::testing::Test { // NOLINT

static std::string mk_key(int i) {
std::ostringstream ss;
ss << std::setw(7) << std::setfill('0') << i;
ss << std::setw(7) << std::setfill('0') << i; // NOLINT
return ss.str();
}

Expand All @@ -58,7 +58,7 @@ static std::string mk_key(int i) {

TEST_F(tsurugi_issue313_2, sequence_epoch_ver_order) { // NOLINT

int n = 655360; // set this for enough size
int n = 655360; // set this for enough size // NOLINT
SequenceId seqid{};
ASSERT_OK(create_sequence(&seqid));

Expand Down Expand Up @@ -87,8 +87,8 @@ TEST_F(tsurugi_issue313_2, sequence_epoch_ver_order) { // NOLINT
auto epoch_insert_start = epoch::get_global_epoch();
for (int i = 0; i < n; i++) {
ASSERT_OK(insert(s, st, mk_key(i), "val"));
if (i % 1000 == 0) {
if (epoch::get_global_epoch() - epoch_insert_start > 20) {
if (i % 1000 == 0) { // NOLINT
if (epoch::get_global_epoch() - epoch_insert_start > 20) { // NOLINT
LOG(INFO) << "takes too long time, shrink n " << n << " to "
<< i;
n = i;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ INSTANTIATE_TEST_SUITE_P( // NOLINT
));

void wait_start_tx(Token tx) {
TxStateHandle sth;
TxStateHandle sth{};
ASSERT_OK(acquire_tx_state_handle(tx, sth));
while (true) {
TxState state;
Expand All @@ -59,11 +59,11 @@ TEST_P(tsurugi_issue323, must_not_read_inserting_record) { // NOLINT
transaction_type write_tx_type = std::get<0>(GetParam());
transaction_type read_tx_type = std::get<1>(GetParam());
// setup
Storage st;
Storage st{};
ASSERT_OK(create_storage("", st));
wait_epoch_update();

Token txw;
Token txw{};
ASSERT_OK(enter(txw));
if (write_tx_type == transaction_type::LONG) {
ASSERT_OK(tx_begin({txw, write_tx_type, {st}}));
Expand All @@ -73,7 +73,7 @@ TEST_P(tsurugi_issue323, must_not_read_inserting_record) { // NOLINT
wait_start_tx(txw);
wait_epoch_update();

Token txr;
Token txr{};
ASSERT_OK(enter(txr));
ASSERT_OK(tx_begin({txr, read_tx_type}));
wait_start_tx(txr);
Expand Down

0 comments on commit fc42b91

Please sign in to comment.