test_tasktable.cpp 15.3 KB
Newer Older
J
jinhai 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements.  See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership.  The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License.  You may obtain a copy of the License at
//
//   http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied.  See the License for the
// specific language governing permissions and limitations
// under the License.


W
wxyu 已提交
19
#include "scheduler/TaskTable.h"
W
wxyu 已提交
20
#include "scheduler/task/TestTask.h"
W
wxyu 已提交
21
#include "scheduler/tasklabel/DefaultLabel.h"
W
wxyu 已提交
22 23
#include <gtest/gtest.h>

W
wxyu 已提交
24 25
/************ TaskTableBaseTest ************/

W
wxyu 已提交
26
class TaskTableItemTest : public ::testing::Test {
S
starlord 已提交
27
 protected:
W
wxyu 已提交
28 29
    void
    SetUp() override {
S
starlord 已提交
30 31 32 33 34 35 36 37 38
        std::vector<milvus::scheduler::TaskTableItemState> states{
            milvus::scheduler::TaskTableItemState::INVALID,
            milvus::scheduler::TaskTableItemState::START,
            milvus::scheduler::TaskTableItemState::LOADING,
            milvus::scheduler::TaskTableItemState::LOADED,
            milvus::scheduler::TaskTableItemState::EXECUTING,
            milvus::scheduler::TaskTableItemState::EXECUTED,
            milvus::scheduler::TaskTableItemState::MOVING,
            milvus::scheduler::TaskTableItemState::MOVED};
W
wxyu 已提交
39
        for (auto &state : states) {
S
starlord 已提交
40
            auto item = std::make_shared<milvus::scheduler::TaskTableItem>();
W
wxyu 已提交
41 42 43
            item->state = state;
            items_.emplace_back(item);
        }
W
wxyu 已提交
44 45
    }

S
starlord 已提交
46 47
    milvus::scheduler::TaskTableItem default_;
    std::vector<milvus::scheduler::TaskTableItemPtr> items_;
W
wxyu 已提交
48 49
};

S
starlord 已提交
50
TEST_F(TaskTableItemTest, CONSTRUCT) {
W
wxyu 已提交
51
    ASSERT_EQ(default_.id, 0);
W
wxyu 已提交
52
    ASSERT_EQ(default_.task, nullptr);
S
starlord 已提交
53
    ASSERT_EQ(default_.state, milvus::scheduler::TaskTableItemState::INVALID);
W
wxyu 已提交
54 55
}

S
starlord 已提交
56
TEST_F(TaskTableItemTest, DESTRUCT) {
S
starlord 已提交
57
    auto p_item = new milvus::scheduler::TaskTableItem();
W
wxyu 已提交
58 59 60
    delete p_item;
}

S
starlord 已提交
61
TEST_F(TaskTableItemTest, IS_FINISH) {
W
wxyu 已提交
62
    for (auto &item : items_) {
S
starlord 已提交
63 64
        if (item->state == milvus::scheduler::TaskTableItemState::EXECUTED
            || item->state == milvus::scheduler::TaskTableItemState::MOVED) {
W
wxyu 已提交
65 66 67 68 69 70 71
            ASSERT_TRUE(item->IsFinish());
        } else {
            ASSERT_FALSE(item->IsFinish());
        }
    }
}

S
starlord 已提交
72
TEST_F(TaskTableItemTest, DUMP) {
W
wxyu 已提交
73 74 75 76 77
    for (auto &item : items_) {
        ASSERT_FALSE(item->Dump().empty());
    }
}

S
starlord 已提交
78
TEST_F(TaskTableItemTest, LOAD) {
W
wxyu 已提交
79 80 81
    for (auto &item : items_) {
        auto before_state = item->state;
        auto ret = item->Load();
S
starlord 已提交
82
        if (before_state == milvus::scheduler::TaskTableItemState::START) {
W
wxyu 已提交
83
            ASSERT_TRUE(ret);
S
starlord 已提交
84
            ASSERT_EQ(item->state, milvus::scheduler::TaskTableItemState::LOADING);
W
wxyu 已提交
85 86 87 88 89 90 91
        } else {
            ASSERT_FALSE(ret);
            ASSERT_EQ(item->state, before_state);
        }
    }
}

S
starlord 已提交
92
TEST_F(TaskTableItemTest, LOADED) {
W
wxyu 已提交
93 94 95
    for (auto &item : items_) {
        auto before_state = item->state;
        auto ret = item->Loaded();
S
starlord 已提交
96
        if (before_state == milvus::scheduler::TaskTableItemState::LOADING) {
W
wxyu 已提交
97
            ASSERT_TRUE(ret);
S
starlord 已提交
98
            ASSERT_EQ(item->state, milvus::scheduler::TaskTableItemState::LOADED);
W
wxyu 已提交
99 100 101 102 103 104 105
        } else {
            ASSERT_FALSE(ret);
            ASSERT_EQ(item->state, before_state);
        }
    }
}

S
starlord 已提交
106
TEST_F(TaskTableItemTest, EXECUTE) {
W
wxyu 已提交
107 108 109
    for (auto &item : items_) {
        auto before_state = item->state;
        auto ret = item->Execute();
S
starlord 已提交
110
        if (before_state == milvus::scheduler::TaskTableItemState::LOADED) {
W
wxyu 已提交
111
            ASSERT_TRUE(ret);
S
starlord 已提交
112
            ASSERT_EQ(item->state, milvus::scheduler::TaskTableItemState::EXECUTING);
W
wxyu 已提交
113 114 115 116 117 118 119
        } else {
            ASSERT_FALSE(ret);
            ASSERT_EQ(item->state, before_state);
        }
    }
}

S
starlord 已提交
120
TEST_F(TaskTableItemTest, EXECUTED) {
W
wxyu 已提交
121 122 123
    for (auto &item : items_) {
        auto before_state = item->state;
        auto ret = item->Executed();
S
starlord 已提交
124
        if (before_state == milvus::scheduler::TaskTableItemState::EXECUTING) {
W
wxyu 已提交
125
            ASSERT_TRUE(ret);
S
starlord 已提交
126
            ASSERT_EQ(item->state, milvus::scheduler::TaskTableItemState::EXECUTED);
W
wxyu 已提交
127 128 129 130 131 132 133
        } else {
            ASSERT_FALSE(ret);
            ASSERT_EQ(item->state, before_state);
        }
    }
}

S
starlord 已提交
134
TEST_F(TaskTableItemTest, MOVE) {
W
wxyu 已提交
135 136 137
    for (auto &item : items_) {
        auto before_state = item->state;
        auto ret = item->Move();
S
starlord 已提交
138
        if (before_state == milvus::scheduler::TaskTableItemState::LOADED) {
W
wxyu 已提交
139
            ASSERT_TRUE(ret);
S
starlord 已提交
140
            ASSERT_EQ(item->state, milvus::scheduler::TaskTableItemState::MOVING);
W
wxyu 已提交
141 142 143 144 145 146 147
        } else {
            ASSERT_FALSE(ret);
            ASSERT_EQ(item->state, before_state);
        }
    }
}

S
starlord 已提交
148
TEST_F(TaskTableItemTest, MOVED) {
W
wxyu 已提交
149 150 151
    for (auto &item : items_) {
        auto before_state = item->state;
        auto ret = item->Moved();
S
starlord 已提交
152
        if (before_state == milvus::scheduler::TaskTableItemState::MOVING) {
W
wxyu 已提交
153
            ASSERT_TRUE(ret);
S
starlord 已提交
154
            ASSERT_EQ(item->state, milvus::scheduler::TaskTableItemState::MOVED);
W
wxyu 已提交
155 156 157 158 159 160
        } else {
            ASSERT_FALSE(ret);
            ASSERT_EQ(item->state, before_state);
        }
    }
}
W
wxyu 已提交
161 162 163 164

/************ TaskTableBaseTest ************/

class TaskTableBaseTest : public ::testing::Test {
S
starlord 已提交
165
 protected:
W
wxyu 已提交
166 167
    void
    SetUp() override {
S
starlord 已提交
168
        milvus::scheduler::TableFileSchemaPtr dummy = nullptr;
W
wxyu 已提交
169
        invalid_task_ = nullptr;
S
starlord 已提交
170 171 172
        auto label = std::make_shared<milvus::scheduler::DefaultLabel>();
        task1_ = std::make_shared<milvus::scheduler::TestTask>(dummy, label);
        task2_ = std::make_shared<milvus::scheduler::TestTask>(dummy, label);
W
wxyu 已提交
173 174
    }

S
starlord 已提交
175 176 177 178
    milvus::scheduler::TaskPtr invalid_task_;
    milvus::scheduler::TaskPtr task1_;
    milvus::scheduler::TaskPtr task2_;
    milvus::scheduler::TaskTable empty_table_;
W
wxyu 已提交
179 180
};

S
starlord 已提交
181
TEST_F(TaskTableBaseTest, SUBSCRIBER) {
W
wxyu 已提交
182 183 184 185 186 187 188 189 190
    bool flag = false;
    auto callback = [&]() {
        flag = true;
    };
    empty_table_.RegisterSubscriber(callback);
    empty_table_.Put(task1_);
    ASSERT_TRUE(flag);
}

S
starlord 已提交
191
TEST_F(TaskTableBaseTest, PUT_TASK) {
W
wxyu 已提交
192
    empty_table_.Put(task1_);
W
wxyu 已提交
193
    ASSERT_EQ(empty_table_.Get(0)->task, task1_);
W
wxyu 已提交
194 195
}

S
starlord 已提交
196
TEST_F(TaskTableBaseTest, PUT_INVALID_TEST) {
W
wxyu 已提交
197
    empty_table_.Put(invalid_task_);
W
wxyu 已提交
198
    ASSERT_EQ(empty_table_.Get(0)->task, invalid_task_);
W
wxyu 已提交
199 200
}

S
starlord 已提交
201
TEST_F(TaskTableBaseTest, PUT_BATCH) {
S
starlord 已提交
202
    std::vector<milvus::scheduler::TaskPtr> tasks{task1_, task2_};
W
wxyu 已提交
203
    empty_table_.Put(tasks);
W
wxyu 已提交
204 205
    ASSERT_EQ(empty_table_.Get(0)->task, task1_);
    ASSERT_EQ(empty_table_.Get(1)->task, task2_);
W
wxyu 已提交
206 207
}

S
starlord 已提交
208
TEST_F(TaskTableBaseTest, PUT_EMPTY_BATCH) {
S
starlord 已提交
209
    std::vector<milvus::scheduler::TaskPtr> tasks{};
W
wxyu 已提交
210 211 212
    empty_table_.Put(tasks);
}

S
starlord 已提交
213
TEST_F(TaskTableBaseTest, EMPTY) {
W
wxyu 已提交
214 215 216 217 218
    ASSERT_TRUE(empty_table_.Empty());
    empty_table_.Put(task1_);
    ASSERT_FALSE(empty_table_.Empty());
}

S
starlord 已提交
219
TEST_F(TaskTableBaseTest, SIZE) {
W
wxyu 已提交
220 221 222 223 224
    ASSERT_EQ(empty_table_.Size(), 0);
    empty_table_.Put(task1_);
    ASSERT_EQ(empty_table_.Size(), 1);
}

S
starlord 已提交
225
TEST_F(TaskTableBaseTest, OPERATOR) {
W
wxyu 已提交
226 227 228 229
    empty_table_.Put(task1_);
    ASSERT_EQ(empty_table_.Get(0), empty_table_[0]);
}

S
starlord 已提交
230
TEST_F(TaskTableBaseTest, PICK_TO_LOAD) {
W
wxyu 已提交
231 232 233 234
    const size_t NUM_TASKS = 10;
    for (size_t i = 0; i < NUM_TASKS; ++i) {
        empty_table_.Put(task1_);
    }
S
starlord 已提交
235 236
    empty_table_[0]->state = milvus::scheduler::TaskTableItemState::MOVED;
    empty_table_[1]->state = milvus::scheduler::TaskTableItemState::EXECUTED;
W
wxyu 已提交
237 238 239 240 241 242

    auto indexes = empty_table_.PickToLoad(1);
    ASSERT_EQ(indexes.size(), 1);
    ASSERT_EQ(indexes[0], 2);
}

S
starlord 已提交
243
TEST_F(TaskTableBaseTest, PICK_TO_LOAD_LIMIT) {
W
wxyu 已提交
244 245 246 247
    const size_t NUM_TASKS = 10;
    for (size_t i = 0; i < NUM_TASKS; ++i) {
        empty_table_.Put(task1_);
    }
S
starlord 已提交
248 249
    empty_table_[0]->state = milvus::scheduler::TaskTableItemState::MOVED;
    empty_table_[1]->state = milvus::scheduler::TaskTableItemState::EXECUTED;
W
wxyu 已提交
250 251 252 253 254 255 256 257

    auto indexes = empty_table_.PickToLoad(3);
    ASSERT_EQ(indexes.size(), 3);
    ASSERT_EQ(indexes[0], 2);
    ASSERT_EQ(indexes[1], 3);
    ASSERT_EQ(indexes[2], 4);
}

S
starlord 已提交
258
TEST_F(TaskTableBaseTest, PICK_TO_LOAD_CACHE) {
W
wxyu 已提交
259 260 261 262
    const size_t NUM_TASKS = 10;
    for (size_t i = 0; i < NUM_TASKS; ++i) {
        empty_table_.Put(task1_);
    }
S
starlord 已提交
263 264
    empty_table_[0]->state = milvus::scheduler::TaskTableItemState::MOVED;
    empty_table_[1]->state = milvus::scheduler::TaskTableItemState::EXECUTED;
W
wxyu 已提交
265 266 267 268 269 270 271 272

    // first pick, non-cache
    auto indexes = empty_table_.PickToLoad(1);
    ASSERT_EQ(indexes.size(), 1);
    ASSERT_EQ(indexes[0], 2);

    // second pick, iterate from 2
    // invalid state change
S
starlord 已提交
273
    empty_table_[1]->state = milvus::scheduler::TaskTableItemState::START;
W
wxyu 已提交
274 275 276 277 278
    indexes = empty_table_.PickToLoad(1);
    ASSERT_EQ(indexes.size(), 1);
    ASSERT_EQ(indexes[0], 2);
}

S
starlord 已提交
279
TEST_F(TaskTableBaseTest, PICK_TO_EXECUTE) {
W
wxyu 已提交
280 281 282 283
    const size_t NUM_TASKS = 10;
    for (size_t i = 0; i < NUM_TASKS; ++i) {
        empty_table_.Put(task1_);
    }
S
starlord 已提交
284 285 286
    empty_table_[0]->state = milvus::scheduler::TaskTableItemState::MOVED;
    empty_table_[1]->state = milvus::scheduler::TaskTableItemState::EXECUTED;
    empty_table_[2]->state = milvus::scheduler::TaskTableItemState::LOADED;
W
wxyu 已提交
287 288 289 290 291 292

    auto indexes = empty_table_.PickToExecute(1);
    ASSERT_EQ(indexes.size(), 1);
    ASSERT_EQ(indexes[0], 2);
}

S
starlord 已提交
293
TEST_F(TaskTableBaseTest, PICK_TO_EXECUTE_LIMIT) {
W
wxyu 已提交
294 295 296 297
    const size_t NUM_TASKS = 10;
    for (size_t i = 0; i < NUM_TASKS; ++i) {
        empty_table_.Put(task1_);
    }
S
starlord 已提交
298 299 300 301
    empty_table_[0]->state = milvus::scheduler::TaskTableItemState::MOVED;
    empty_table_[1]->state = milvus::scheduler::TaskTableItemState::EXECUTED;
    empty_table_[2]->state = milvus::scheduler::TaskTableItemState::LOADED;
    empty_table_[3]->state = milvus::scheduler::TaskTableItemState::LOADED;
W
wxyu 已提交
302 303 304 305 306 307 308

    auto indexes = empty_table_.PickToExecute(3);
    ASSERT_EQ(indexes.size(), 2);
    ASSERT_EQ(indexes[0], 2);
    ASSERT_EQ(indexes[1], 3);
}

S
starlord 已提交
309
TEST_F(TaskTableBaseTest, PICK_TO_EXECUTE_CACHE) {
W
wxyu 已提交
310 311 312 313
    const size_t NUM_TASKS = 10;
    for (size_t i = 0; i < NUM_TASKS; ++i) {
        empty_table_.Put(task1_);
    }
S
starlord 已提交
314 315 316
    empty_table_[0]->state = milvus::scheduler::TaskTableItemState::MOVED;
    empty_table_[1]->state = milvus::scheduler::TaskTableItemState::EXECUTED;
    empty_table_[2]->state = milvus::scheduler::TaskTableItemState::LOADED;
W
wxyu 已提交
317 318 319 320 321 322 323 324

    // first pick, non-cache
    auto indexes = empty_table_.PickToExecute(1);
    ASSERT_EQ(indexes.size(), 1);
    ASSERT_EQ(indexes[0], 2);

    // second pick, iterate from 2
    // invalid state change
S
starlord 已提交
325
    empty_table_[1]->state = milvus::scheduler::TaskTableItemState::START;
W
wxyu 已提交
326 327 328 329 330
    indexes = empty_table_.PickToExecute(1);
    ASSERT_EQ(indexes.size(), 1);
    ASSERT_EQ(indexes[0], 2);
}

W
wxyu 已提交
331 332 333
/************ TaskTableAdvanceTest ************/

class TaskTableAdvanceTest : public ::testing::Test {
S
starlord 已提交
334
 protected:
W
wxyu 已提交
335 336
    void
    SetUp() override {
S
starlord 已提交
337
        milvus::scheduler::TableFileSchemaPtr dummy = nullptr;
W
wxyu 已提交
338
        for (uint64_t i = 0; i < 8; ++i) {
S
starlord 已提交
339 340
            auto label = std::make_shared<milvus::scheduler::DefaultLabel>();
            auto task = std::make_shared<milvus::scheduler::TestTask>(dummy, label);
W
wxyu 已提交
341 342 343
            table1_.Put(task);
        }

S
starlord 已提交
344 345 346 347 348 349 350 351
        table1_.Get(0)->state = milvus::scheduler::TaskTableItemState::INVALID;
        table1_.Get(1)->state = milvus::scheduler::TaskTableItemState::START;
        table1_.Get(2)->state = milvus::scheduler::TaskTableItemState::LOADING;
        table1_.Get(3)->state = milvus::scheduler::TaskTableItemState::LOADED;
        table1_.Get(4)->state = milvus::scheduler::TaskTableItemState::EXECUTING;
        table1_.Get(5)->state = milvus::scheduler::TaskTableItemState::EXECUTED;
        table1_.Get(6)->state = milvus::scheduler::TaskTableItemState::MOVING;
        table1_.Get(7)->state = milvus::scheduler::TaskTableItemState::MOVED;
W
wxyu 已提交
352 353
    }

S
starlord 已提交
354
    milvus::scheduler::TaskTable table1_;
W
wxyu 已提交
355 356
};

S
starlord 已提交
357
TEST_F(TaskTableAdvanceTest, LOAD) {
S
starlord 已提交
358
    std::vector<milvus::scheduler::TaskTableItemState> before_state;
W
wxyu 已提交
359 360 361 362 363 364 365 366 367
    for (auto &task : table1_) {
        before_state.push_back(task->state);
    }

    for (size_t i = 0; i < table1_.Size(); ++i) {
        table1_.Load(i);
    }

    for (size_t i = 0; i < table1_.Size(); ++i) {
S
starlord 已提交
368 369
        if (before_state[i] == milvus::scheduler::TaskTableItemState::START) {
            ASSERT_EQ(table1_.Get(i)->state, milvus::scheduler::TaskTableItemState::LOADING);
W
wxyu 已提交
370 371 372 373 374 375
        } else {
            ASSERT_EQ(table1_.Get(i)->state, before_state[i]);
        }
    }
}

S
starlord 已提交
376
TEST_F(TaskTableAdvanceTest, LOADED) {
S
starlord 已提交
377
    std::vector<milvus::scheduler::TaskTableItemState> before_state;
W
wxyu 已提交
378 379 380 381 382 383 384
    for (auto &task : table1_) {
        before_state.push_back(task->state);
    }

    for (size_t i = 0; i < table1_.Size(); ++i) {
        table1_.Loaded(i);
    }
W
wxyu 已提交
385

W
wxyu 已提交
386
    for (size_t i = 0; i < table1_.Size(); ++i) {
S
starlord 已提交
387 388
        if (before_state[i] == milvus::scheduler::TaskTableItemState::LOADING) {
            ASSERT_EQ(table1_.Get(i)->state, milvus::scheduler::TaskTableItemState::LOADED);
W
wxyu 已提交
389 390 391 392
        } else {
            ASSERT_EQ(table1_.Get(i)->state, before_state[i]);
        }
    }
W
wxyu 已提交
393 394
}

S
starlord 已提交
395
TEST_F(TaskTableAdvanceTest, EXECUTE) {
S
starlord 已提交
396
    std::vector<milvus::scheduler::TaskTableItemState> before_state;
W
wxyu 已提交
397 398 399 400 401 402 403
    for (auto &task : table1_) {
        before_state.push_back(task->state);
    }

    for (size_t i = 0; i < table1_.Size(); ++i) {
        table1_.Execute(i);
    }
W
wxyu 已提交
404

W
wxyu 已提交
405
    for (size_t i = 0; i < table1_.Size(); ++i) {
S
starlord 已提交
406 407
        if (before_state[i] == milvus::scheduler::TaskTableItemState::LOADED) {
            ASSERT_EQ(table1_.Get(i)->state, milvus::scheduler::TaskTableItemState::EXECUTING);
W
wxyu 已提交
408 409 410 411 412 413
        } else {
            ASSERT_EQ(table1_.Get(i)->state, before_state[i]);
        }
    }
}

S
starlord 已提交
414
TEST_F(TaskTableAdvanceTest, EXECUTED) {
S
starlord 已提交
415
    std::vector<milvus::scheduler::TaskTableItemState> before_state;
W
wxyu 已提交
416 417 418 419 420 421 422 423 424
    for (auto &task : table1_) {
        before_state.push_back(task->state);
    }

    for (size_t i = 0; i < table1_.Size(); ++i) {
        table1_.Executed(i);
    }

    for (size_t i = 0; i < table1_.Size(); ++i) {
S
starlord 已提交
425 426
        if (before_state[i] == milvus::scheduler::TaskTableItemState::EXECUTING) {
            ASSERT_EQ(table1_.Get(i)->state, milvus::scheduler::TaskTableItemState::EXECUTED);
W
wxyu 已提交
427 428 429 430
        } else {
            ASSERT_EQ(table1_.Get(i)->state, before_state[i]);
        }
    }
W
wxyu 已提交
431 432
}

S
starlord 已提交
433
TEST_F(TaskTableAdvanceTest, MOVE) {
S
starlord 已提交
434
    std::vector<milvus::scheduler::TaskTableItemState> before_state;
W
wxyu 已提交
435 436 437 438 439 440 441 442 443
    for (auto &task : table1_) {
        before_state.push_back(task->state);
    }

    for (size_t i = 0; i < table1_.Size(); ++i) {
        table1_.Move(i);
    }

    for (size_t i = 0; i < table1_.Size(); ++i) {
S
starlord 已提交
444 445
        if (before_state[i] == milvus::scheduler::TaskTableItemState::LOADED) {
            ASSERT_EQ(table1_.Get(i)->state, milvus::scheduler::TaskTableItemState::MOVING);
W
wxyu 已提交
446 447 448 449 450
        } else {
            ASSERT_EQ(table1_.Get(i)->state, before_state[i]);
        }
    }
}
W
wxyu 已提交
451

S
starlord 已提交
452
TEST_F(TaskTableAdvanceTest, MOVED) {
S
starlord 已提交
453
    std::vector<milvus::scheduler::TaskTableItemState> before_state;
W
wxyu 已提交
454 455 456 457 458 459 460 461 462
    for (auto &task : table1_) {
        before_state.push_back(task->state);
    }

    for (size_t i = 0; i < table1_.Size(); ++i) {
        table1_.Moved(i);
    }

    for (size_t i = 0; i < table1_.Size(); ++i) {
S
starlord 已提交
463 464
        if (before_state[i] == milvus::scheduler::TaskTableItemState::MOVING) {
            ASSERT_EQ(table1_.Get(i)->state, milvus::scheduler::TaskTableItemState::MOVED);
W
wxyu 已提交
465 466 467 468
        } else {
            ASSERT_EQ(table1_.Get(i)->state, before_state[i]);
        }
    }
W
wxyu 已提交
469
}
W
wxyu 已提交
470