manojkiraneda | 4eaf2ee | 2019-12-13 17:10:41 +0530 | [diff] [blame] | 1 | #include "ibm/locks.hpp" |
manojkiraneda | 4eaf2ee | 2019-12-13 17:10:41 +0530 | [diff] [blame] | 2 | |
Nan Zhou | d5c80ad | 2022-07-11 01:16:31 +0000 | [diff] [blame] | 3 | #include <cstdint> |
| 4 | #include <memory> |
Gunnar Mills | 1214b7e | 2020-06-04 10:11:30 -0500 | [diff] [blame] | 5 | #include <string> |
Nan Zhou | d5c80ad | 2022-07-11 01:16:31 +0000 | [diff] [blame] | 6 | #include <tuple> |
| 7 | #include <utility> |
| 8 | #include <variant> |
| 9 | #include <vector> |
Gunnar Mills | 1214b7e | 2020-06-04 10:11:30 -0500 | [diff] [blame] | 10 | |
Nan Zhou | d5c80ad | 2022-07-11 01:16:31 +0000 | [diff] [blame] | 11 | #include <gmock/gmock.h> // IWYU pragma: keep |
| 12 | #include <gtest/gtest.h> // IWYU pragma: keep |
| 13 | |
| 14 | // IWYU pragma: no_include <gtest/gtest-message.h> |
| 15 | // IWYU pragma: no_include <gtest/gtest-test-part.h> |
| 16 | // IWYU pragma: no_include "gtest/gtest_pred_impl.h" |
manojkiraneda | 4eaf2ee | 2019-12-13 17:10:41 +0530 | [diff] [blame] | 17 | |
Nan Zhou | 38ead5e | 2022-07-03 23:07:27 +0000 | [diff] [blame] | 18 | namespace crow::ibm_mc_lock |
manojkiraneda | 4eaf2ee | 2019-12-13 17:10:41 +0530 | [diff] [blame] | 19 | { |
Nan Zhou | 38ead5e | 2022-07-03 23:07:27 +0000 | [diff] [blame] | 20 | namespace |
manojkiraneda | 4eaf2ee | 2019-12-13 17:10:41 +0530 | [diff] [blame] | 21 | { |
Nan Zhou | 38ead5e | 2022-07-03 23:07:27 +0000 | [diff] [blame] | 22 | |
manojkiraneda | 4eaf2ee | 2019-12-13 17:10:41 +0530 | [diff] [blame] | 23 | using SType = std::string; |
| 24 | using LockRequest = std::tuple<SType, SType, SType, uint64_t, SegmentFlags>; |
| 25 | using LockRequests = std::vector<LockRequest>; |
| 26 | using Rc = |
| 27 | std::pair<bool, std::variant<uint32_t, std::pair<uint32_t, LockRequest>>>; |
| 28 | using RcRelaseLock = std::pair<bool, std::pair<uint32_t, LockRequest>>; |
| 29 | using RcGetLockList = |
| 30 | std::variant<std::string, std::vector<std::pair<uint32_t, LockRequests>>>; |
| 31 | using ListOfTransactionIds = std::vector<uint32_t>; |
| 32 | using RcAcquireLock = std::pair<bool, std::variant<Rc, std::pair<bool, int>>>; |
| 33 | using RcReleaseLockApi = std::pair<bool, std::variant<bool, RcRelaseLock>>; |
| 34 | using SessionFlags = std::pair<SType, SType>; |
| 35 | using ListOfSessionIds = std::vector<std::string>; |
Nan Zhou | b5a10a2 | 2022-07-04 01:18:14 +0000 | [diff] [blame] | 36 | using ::testing::IsEmpty; |
manojkiraneda | 4eaf2ee | 2019-12-13 17:10:41 +0530 | [diff] [blame] | 37 | |
| 38 | class LockTest : public ::testing::Test |
| 39 | { |
| 40 | protected: |
| 41 | LockRequests request; |
| 42 | LockRequests request1, request2; |
| 43 | LockRequest record; |
| 44 | |
| 45 | public: |
| 46 | LockTest() |
| 47 | { |
| 48 | record = { |
| 49 | "xxxxx", "hmc-id", "Read", 234, {{"DontLock", 2}, {"DontLock", 4}}}; |
| 50 | // lockrequest with multiple lockrequests |
| 51 | request = {{"xxxxx", |
| 52 | "hmc-id", |
| 53 | "Read", |
| 54 | 234, |
| 55 | {{"DontLock", 2}, {"DontLock", 4}}}, |
| 56 | {"xxxxx", |
| 57 | "hmc-id", |
| 58 | "Read", |
| 59 | 234, |
| 60 | {{"DontLock", 2}, {"DontLock", 4}}}}; |
| 61 | request1 = {{"xxxxx", |
| 62 | "hmc-id", |
| 63 | "Read", |
| 64 | 234, |
| 65 | {{"DontLock", 2}, {"DontLock", 4}}}}; |
| 66 | request2 = {{"xxxxx", |
| 67 | "hmc-id", |
| 68 | "Write", |
| 69 | 234, |
| 70 | {{"LockAll", 2}, {"DontLock", 4}}}}; |
| 71 | } |
Ed Tanous | 3174e4d | 2020-10-07 11:41:22 -0700 | [diff] [blame] | 72 | |
| 73 | ~LockTest() override = default; |
Ed Tanous | ecd6a3a | 2022-01-07 09:18:40 -0800 | [diff] [blame] | 74 | |
| 75 | LockTest(const LockTest&) = delete; |
| 76 | LockTest(LockTest&&) = delete; |
| 77 | LockTest& operator=(const LockTest&) = delete; |
| 78 | LockTest& operator=(const LockTest&&) = delete; |
manojkiraneda | 4eaf2ee | 2019-12-13 17:10:41 +0530 | [diff] [blame] | 79 | }; |
| 80 | |
| 81 | class MockLock : public crow::ibm_mc_lock::Lock |
| 82 | { |
| 83 | public: |
Ed Tanous | b5a7693 | 2020-09-29 16:16:58 -0700 | [diff] [blame] | 84 | bool isValidLockRequest(const LockRequest& record1) override |
manojkiraneda | 4eaf2ee | 2019-12-13 17:10:41 +0530 | [diff] [blame] | 85 | { |
| 86 | bool status = Lock::isValidLockRequest(record1); |
| 87 | return status; |
| 88 | } |
Ed Tanous | b5a7693 | 2020-09-29 16:16:58 -0700 | [diff] [blame] | 89 | bool isConflictRequest(const LockRequests& request) override |
manojkiraneda | 4eaf2ee | 2019-12-13 17:10:41 +0530 | [diff] [blame] | 90 | { |
| 91 | bool status = Lock::isConflictRequest(request); |
| 92 | return status; |
| 93 | } |
Ed Tanous | b5a7693 | 2020-09-29 16:16:58 -0700 | [diff] [blame] | 94 | Rc isConflictWithTable(const LockRequests& request) override |
manojkiraneda | 4eaf2ee | 2019-12-13 17:10:41 +0530 | [diff] [blame] | 95 | { |
| 96 | auto conflict = Lock::isConflictWithTable(request); |
| 97 | return conflict; |
| 98 | } |
| 99 | uint32_t generateTransactionId() override |
| 100 | { |
| 101 | uint32_t tid = Lock::generateTransactionId(); |
| 102 | return tid; |
| 103 | } |
| 104 | |
| 105 | bool validateRids(const ListOfTransactionIds& tids) override |
| 106 | { |
| 107 | bool status = Lock::validateRids(tids); |
| 108 | return status; |
| 109 | } |
| 110 | RcRelaseLock isItMyLock(const ListOfTransactionIds& tids, |
| 111 | const SessionFlags& ids) override |
| 112 | { |
| 113 | auto status = Lock::isItMyLock(tids, ids); |
| 114 | return status; |
| 115 | } |
manojkiraneda | 4eaf2ee | 2019-12-13 17:10:41 +0530 | [diff] [blame] | 116 | friend class LockTest; |
| 117 | }; |
| 118 | |
| 119 | TEST_F(LockTest, ValidationGoodTestCase) |
| 120 | { |
| 121 | MockLock lockManager; |
| 122 | const LockRequest& t = record; |
Nan Zhou | b5a10a2 | 2022-07-04 01:18:14 +0000 | [diff] [blame] | 123 | EXPECT_TRUE(lockManager.isValidLockRequest(t)); |
manojkiraneda | 4eaf2ee | 2019-12-13 17:10:41 +0530 | [diff] [blame] | 124 | } |
| 125 | |
| 126 | TEST_F(LockTest, ValidationBadTestWithLocktype) |
| 127 | { |
| 128 | MockLock lockManager; |
| 129 | // Corrupt the lock type |
| 130 | std::get<2>(record) = "rwrite"; |
| 131 | const LockRequest& t = record; |
Nan Zhou | b5a10a2 | 2022-07-04 01:18:14 +0000 | [diff] [blame] | 132 | EXPECT_FALSE(lockManager.isValidLockRequest(t)); |
manojkiraneda | 4eaf2ee | 2019-12-13 17:10:41 +0530 | [diff] [blame] | 133 | } |
| 134 | |
| 135 | TEST_F(LockTest, ValidationBadTestWithlockFlags) |
| 136 | { |
| 137 | MockLock lockManager; |
| 138 | // Corrupt the lockflag |
| 139 | std::get<4>(record)[0].first = "lock"; |
| 140 | const LockRequest& t = record; |
Nan Zhou | b5a10a2 | 2022-07-04 01:18:14 +0000 | [diff] [blame] | 141 | EXPECT_FALSE(lockManager.isValidLockRequest(t)); |
manojkiraneda | 4eaf2ee | 2019-12-13 17:10:41 +0530 | [diff] [blame] | 142 | } |
| 143 | |
| 144 | TEST_F(LockTest, ValidationBadTestWithSegmentlength) |
| 145 | { |
| 146 | MockLock lockManager; |
| 147 | // Corrupt the Segment length |
| 148 | std::get<4>(record)[0].second = 7; |
| 149 | const LockRequest& t = record; |
Nan Zhou | b5a10a2 | 2022-07-04 01:18:14 +0000 | [diff] [blame] | 150 | EXPECT_FALSE(lockManager.isValidLockRequest(t)); |
manojkiraneda | 4eaf2ee | 2019-12-13 17:10:41 +0530 | [diff] [blame] | 151 | } |
| 152 | |
| 153 | TEST_F(LockTest, MultiRequestWithoutConflict) |
| 154 | { |
| 155 | MockLock lockManager; |
| 156 | const LockRequests& t = request; |
Nan Zhou | b5a10a2 | 2022-07-04 01:18:14 +0000 | [diff] [blame] | 157 | EXPECT_FALSE(lockManager.isConflictRequest(t)); |
manojkiraneda | 4eaf2ee | 2019-12-13 17:10:41 +0530 | [diff] [blame] | 158 | } |
| 159 | |
| 160 | TEST_F(LockTest, MultiRequestWithConflictduetoSameSegmentLength) |
| 161 | { |
| 162 | MockLock lockManager; |
| 163 | // Corrupt the locktype |
| 164 | std::get<2>(request[0]) = "Write"; |
| 165 | // Match the segment lengths to points them to lock similar kind of |
| 166 | // resource |
| 167 | std::get<4>(request[0])[0].first = "LockAll"; |
| 168 | const LockRequests& t = request; |
Nan Zhou | b5a10a2 | 2022-07-04 01:18:14 +0000 | [diff] [blame] | 169 | EXPECT_TRUE(lockManager.isConflictRequest(t)); |
manojkiraneda | 4eaf2ee | 2019-12-13 17:10:41 +0530 | [diff] [blame] | 170 | } |
| 171 | |
| 172 | TEST_F(LockTest, MultiRequestWithoutConflictduetoDifferentSegmentData) |
| 173 | { |
| 174 | MockLock lockManager; |
| 175 | // Corrupt the locktype |
| 176 | std::get<2>(request[0]) = "Write"; |
| 177 | // Match the segment lengths to points them to lock similar kind of |
| 178 | // resource |
| 179 | std::get<4>(request[0])[0].first = "DontLock"; |
| 180 | std::get<4>(request[0])[1].first = "LockAll"; |
| 181 | |
| 182 | // Change the resource id(2nd byte) of first record, so the locks are |
| 183 | // different so no conflict |
| 184 | std::get<3>(request[0]) = 216179379183550464; // HEX 03 00 06 00 00 00 00 00 |
| 185 | std::get<3>(request[1]) = 288236973221478400; // HEX 04 00 06 00 00 00 00 00 |
| 186 | const LockRequests& t = request; |
Nan Zhou | b5a10a2 | 2022-07-04 01:18:14 +0000 | [diff] [blame] | 187 | EXPECT_FALSE(lockManager.isConflictRequest(t)); |
manojkiraneda | 4eaf2ee | 2019-12-13 17:10:41 +0530 | [diff] [blame] | 188 | } |
| 189 | |
| 190 | TEST_F(LockTest, MultiRequestWithConflictduetoSameSegmentData) |
| 191 | { |
| 192 | MockLock lockManager; |
| 193 | // Corrupt the locktype |
| 194 | std::get<2>(request[0]) = "Write"; |
| 195 | // Match the segment lengths to points them to lock similar kind of |
| 196 | // resource |
| 197 | std::get<4>(request[0])[0].first = "DontLock"; |
| 198 | std::get<4>(request[0])[1].first = "LockAll"; |
Nan Zhou | b5a10a2 | 2022-07-04 01:18:14 +0000 | [diff] [blame] | 199 | // Dont Change the resource id(1st & 2nd byte) at all, so that the |
| 200 | // conflict occurs from the second segment which is trying to lock all |
| 201 | // the resources. |
manojkiraneda | 4eaf2ee | 2019-12-13 17:10:41 +0530 | [diff] [blame] | 202 | std::get<3>(request[0]) = 216173882346831872; // 03 00 01 00 2B 00 00 00 |
| 203 | std::get<3>(request[1]) = 216173882346831872; // 03 00 01 00 2B 00 00 00 |
| 204 | const LockRequests& t = request; |
Nan Zhou | b5a10a2 | 2022-07-04 01:18:14 +0000 | [diff] [blame] | 205 | EXPECT_TRUE(lockManager.isConflictRequest(t)); |
manojkiraneda | 4eaf2ee | 2019-12-13 17:10:41 +0530 | [diff] [blame] | 206 | } |
| 207 | |
| 208 | TEST_F(LockTest, MultiRequestWithoutConflictduetoDifferentSegmentLength) |
| 209 | { |
| 210 | MockLock lockManager; |
| 211 | // Corrupt the locktype |
| 212 | std::get<2>(request[0]) = "Write"; |
| 213 | // Match the segment lengths to points them to lock similar kind of |
| 214 | // resource |
| 215 | std::get<4>(request[0])[0].first = "LockSame"; |
| 216 | // Change the segment length , so that the requests are trying to lock |
| 217 | // two different kind of resources |
| 218 | std::get<4>(request[0])[0].second = 3; |
| 219 | const LockRequests& t = request; |
| 220 | // Return No Conflict |
Nan Zhou | b5a10a2 | 2022-07-04 01:18:14 +0000 | [diff] [blame] | 221 | EXPECT_FALSE(lockManager.isConflictRequest(t)); |
manojkiraneda | 4eaf2ee | 2019-12-13 17:10:41 +0530 | [diff] [blame] | 222 | } |
| 223 | |
| 224 | TEST_F(LockTest, MultiRequestWithoutConflictduetoReadLocktype) |
| 225 | { |
| 226 | MockLock lockManager; |
| 227 | // Match the segment lengths to points them to lock similar kind of |
| 228 | // resource |
| 229 | std::get<4>(request[0])[0].first = "LockAll"; |
| 230 | const LockRequests& t = request; |
| 231 | // Return No Conflict |
Nan Zhou | b5a10a2 | 2022-07-04 01:18:14 +0000 | [diff] [blame] | 232 | EXPECT_FALSE(lockManager.isConflictRequest(t)); |
manojkiraneda | 4eaf2ee | 2019-12-13 17:10:41 +0530 | [diff] [blame] | 233 | } |
| 234 | |
| 235 | TEST_F(LockTest, MultiRequestWithoutConflictduetoReadLocktypeAndLockall) |
| 236 | { |
| 237 | MockLock lockManager; |
| 238 | // Match the segment lengths to points them to lock similar kind of |
| 239 | // resource |
| 240 | std::get<4>(request[0])[0].first = "LockAll"; |
| 241 | std::get<4>(request[0])[1].first = "LockAll"; |
| 242 | const LockRequests& t = request; |
| 243 | // Return No Conflict |
Nan Zhou | b5a10a2 | 2022-07-04 01:18:14 +0000 | [diff] [blame] | 244 | EXPECT_FALSE(lockManager.isConflictRequest(t)); |
manojkiraneda | 4eaf2ee | 2019-12-13 17:10:41 +0530 | [diff] [blame] | 245 | } |
| 246 | |
| 247 | TEST_F(LockTest, RequestConflictedWithLockTableEntries) |
| 248 | { |
| 249 | MockLock lockManager; |
| 250 | const LockRequests& t = request1; |
| 251 | auto rc1 = lockManager.isConflictWithTable(t); |
| 252 | // Corrupt the lock type |
| 253 | std::get<2>(request[0]) = "Write"; |
| 254 | // Corrupt the lockflag |
| 255 | std::get<4>(request[0])[1].first = "LockAll"; |
| 256 | const LockRequests& p = request; |
| 257 | auto rc2 = lockManager.isConflictWithTable(p); |
| 258 | // Return a Conflict |
Nan Zhou | b5a10a2 | 2022-07-04 01:18:14 +0000 | [diff] [blame] | 259 | EXPECT_TRUE(rc2.first); |
manojkiraneda | 4eaf2ee | 2019-12-13 17:10:41 +0530 | [diff] [blame] | 260 | } |
| 261 | |
| 262 | TEST_F(LockTest, RequestNotConflictedWithLockTableEntries) |
| 263 | { |
| 264 | MockLock lockManager; |
| 265 | const LockRequests& t = request1; |
| 266 | // Insert the request1 into the lock table |
| 267 | auto rc1 = lockManager.isConflictWithTable(t); |
| 268 | // Corrupt the lock type |
| 269 | std::get<2>(request[0]) = "Read"; |
| 270 | // Corrupt the lockflag |
| 271 | std::get<4>(request[0])[1].first = "LockAll"; |
| 272 | const LockRequests& p = request; |
| 273 | auto rc2 = lockManager.isConflictWithTable(p); |
| 274 | // Return No Conflict |
Nan Zhou | b5a10a2 | 2022-07-04 01:18:14 +0000 | [diff] [blame] | 275 | EXPECT_FALSE(rc2.first); |
manojkiraneda | 4eaf2ee | 2019-12-13 17:10:41 +0530 | [diff] [blame] | 276 | } |
| 277 | |
| 278 | TEST_F(LockTest, TestGenerateTransactionIDFunction) |
| 279 | { |
| 280 | MockLock lockManager; |
Nan Zhou | b5a10a2 | 2022-07-04 01:18:14 +0000 | [diff] [blame] | 281 | uint32_t transactionId1 = lockManager.generateTransactionId(); |
| 282 | uint32_t transactionId2 = lockManager.generateTransactionId(); |
| 283 | EXPECT_EQ(transactionId2, ++transactionId1); |
manojkiraneda | 4eaf2ee | 2019-12-13 17:10:41 +0530 | [diff] [blame] | 284 | } |
| 285 | |
| 286 | TEST_F(LockTest, ValidateTransactionIDsGoodTestCase) |
| 287 | { |
| 288 | MockLock lockManager; |
| 289 | const LockRequests& t = request1; |
| 290 | // Insert the request1 into the lock table |
| 291 | auto rc1 = lockManager.isConflictWithTable(t); |
| 292 | std::vector<uint32_t> tids = {1}; |
| 293 | const std::vector<uint32_t>& p = tids; |
Nan Zhou | b5a10a2 | 2022-07-04 01:18:14 +0000 | [diff] [blame] | 294 | EXPECT_TRUE(lockManager.validateRids(p)); |
manojkiraneda | 4eaf2ee | 2019-12-13 17:10:41 +0530 | [diff] [blame] | 295 | } |
| 296 | |
| 297 | TEST_F(LockTest, ValidateTransactionIDsBadTestCase) |
| 298 | { |
| 299 | MockLock lockManager; |
| 300 | // Insert the request1 into the lock table |
| 301 | const LockRequests& t = request1; |
| 302 | auto rc1 = lockManager.isConflictWithTable(t); |
Sunitha Harish | 3e919b5 | 2020-10-13 01:21:48 -0500 | [diff] [blame] | 303 | std::vector<uint32_t> tids = {10}; |
manojkiraneda | 4eaf2ee | 2019-12-13 17:10:41 +0530 | [diff] [blame] | 304 | const std::vector<uint32_t>& p = tids; |
Nan Zhou | b5a10a2 | 2022-07-04 01:18:14 +0000 | [diff] [blame] | 305 | EXPECT_FALSE(lockManager.validateRids(p)); |
manojkiraneda | 4eaf2ee | 2019-12-13 17:10:41 +0530 | [diff] [blame] | 306 | } |
| 307 | |
| 308 | TEST_F(LockTest, ValidateisItMyLockGoodTestCase) |
| 309 | { |
| 310 | MockLock lockManager; |
| 311 | // Insert the request1 into the lock table |
| 312 | const LockRequests& t = request1; |
| 313 | auto rc1 = lockManager.isConflictWithTable(t); |
| 314 | std::vector<uint32_t> tids = {1}; |
| 315 | const std::vector<uint32_t>& p = tids; |
| 316 | std::string hmcid = "hmc-id"; |
| 317 | std::string sessionid = "xxxxx"; |
| 318 | std::pair<SType, SType> ids = std::make_pair(hmcid, sessionid); |
| 319 | auto rc = lockManager.isItMyLock(p, ids); |
Nan Zhou | b5a10a2 | 2022-07-04 01:18:14 +0000 | [diff] [blame] | 320 | EXPECT_TRUE(rc.first); |
manojkiraneda | 4eaf2ee | 2019-12-13 17:10:41 +0530 | [diff] [blame] | 321 | } |
| 322 | |
| 323 | TEST_F(LockTest, ValidateisItMyLockBadTestCase) |
| 324 | { |
| 325 | MockLock lockManager; |
manojkiraneda | 4eaf2ee | 2019-12-13 17:10:41 +0530 | [diff] [blame] | 326 | // Corrupt the client identifier |
| 327 | std::get<1>(request1[0]) = "randomid"; |
| 328 | // Insert the request1 into the lock table |
| 329 | const LockRequests& t = request1; |
| 330 | auto rc1 = lockManager.isConflictWithTable(t); |
| 331 | std::vector<uint32_t> tids = {1}; |
| 332 | const std::vector<uint32_t>& p = tids; |
| 333 | std::string hmcid = "hmc-id"; |
Sunitha Harish | 3e919b5 | 2020-10-13 01:21:48 -0500 | [diff] [blame] | 334 | std::string sessionid = "random"; |
manojkiraneda | 4eaf2ee | 2019-12-13 17:10:41 +0530 | [diff] [blame] | 335 | std::pair<SType, SType> ids = std::make_pair(hmcid, sessionid); |
| 336 | auto rc = lockManager.isItMyLock(p, ids); |
Nan Zhou | b5a10a2 | 2022-07-04 01:18:14 +0000 | [diff] [blame] | 337 | EXPECT_FALSE(rc.first); |
manojkiraneda | 4eaf2ee | 2019-12-13 17:10:41 +0530 | [diff] [blame] | 338 | } |
| 339 | |
| 340 | TEST_F(LockTest, ValidateSessionIDForGetlocklistBadTestCase) |
| 341 | { |
| 342 | MockLock lockManager; |
| 343 | // Insert the request1 into the lock table |
| 344 | const LockRequests& t = request1; |
| 345 | auto rc1 = lockManager.isConflictWithTable(t); |
| 346 | std::vector<std::string> sessionid = {"random"}; |
| 347 | auto status = lockManager.getLockList(sessionid); |
| 348 | auto result = |
| 349 | std::get<std::vector<std::pair<uint32_t, LockRequests>>>(status); |
Nan Zhou | b5a10a2 | 2022-07-04 01:18:14 +0000 | [diff] [blame] | 350 | EXPECT_THAT(result, IsEmpty()); |
manojkiraneda | 4eaf2ee | 2019-12-13 17:10:41 +0530 | [diff] [blame] | 351 | } |
| 352 | |
| 353 | TEST_F(LockTest, ValidateSessionIDForGetlocklistGoodTestCase) |
| 354 | { |
| 355 | MockLock lockManager; |
| 356 | // Insert the request1 into the lock table |
| 357 | const LockRequests& t = request1; |
| 358 | auto rc1 = lockManager.isConflictWithTable(t); |
| 359 | std::vector<std::string> sessionid = {"xxxxx"}; |
| 360 | auto status = lockManager.getLockList(sessionid); |
| 361 | auto result = |
| 362 | std::get<std::vector<std::pair<uint32_t, LockRequests>>>(status); |
Nan Zhou | b5a10a2 | 2022-07-04 01:18:14 +0000 | [diff] [blame] | 363 | EXPECT_EQ(result.size(), 1); |
manojkiraneda | 4eaf2ee | 2019-12-13 17:10:41 +0530 | [diff] [blame] | 364 | } |
Sunitha Harish | 3e919b5 | 2020-10-13 01:21:48 -0500 | [diff] [blame] | 365 | |
Nan Zhou | 38ead5e | 2022-07-03 23:07:27 +0000 | [diff] [blame] | 366 | } // namespace |
| 367 | } // namespace crow::ibm_mc_lock |