Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
ban-nobuhiro committed Nov 4, 2024
1 parent c4653ea commit a3e1078
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions test/tsurugi_issues/tsurugi_issue1016_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class tsurugi_issue1016_test : public ::testing::Test {
static inline std::once_flag init_;
};

TEST_F(tsurugi_issue1016_test, modify_by_upsert_may_not_cause_ERR_CC) {
TEST_F(tsurugi_issue1016_test, modify_by_upsert_must_not_change_tidword) {
// setup
// storage = {}

Expand All @@ -56,8 +56,9 @@ TEST_F(tsurugi_issue1016_test, modify_by_upsert_may_not_cause_ERR_CC) {
// wait epoch
// OCC1: upsert A 1, commit -> OK
// OCC2: search_key A -> OK, reads A=1
// OCC3: upsert A 3, commit -> OK
// OCC2: commit -> OK <- wrong
// OCC3: upsert A 3 -> OK
// OCC3: commit -> OK <- sometime use same tid as previous
// OCC2: commit -> OK <- wrong, read_verify doesn't work

Storage st{};
ASSERT_OK(create_storage("", st));
Expand All @@ -79,6 +80,7 @@ TEST_F(tsurugi_issue1016_test, modify_by_upsert_may_not_cause_ERR_CC) {

std::string buf{};
ASSERT_OK(search_key(s2, st, "A", buf));
ASSERT_EQ(buf, "1");

ASSERT_OK(upsert(s3, st, "A", "3"));
ASSERT_OK(commit(s3));
Expand Down

0 comments on commit a3e1078

Please sign in to comment.