Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
CPWstatic committed Sep 17, 2021
1 parent 32e829c commit 97be865
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
3 changes: 1 addition & 2 deletions src/graph/validator/test/AdminValidatorTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ TEST_F(AdminValidatorTest, SpaceTest) {
checkResult("CREATE SPACE TEST(vid_type = fixed_string(2)); DESC SPACE TEST;", expected));
}
{
std::vector<PlanNode::Kind> expected = {
PK::kUpdateSession, PK::kSwitchSpace, PK::kCreateSpace, PK::kStart};
std::vector<PlanNode::Kind> expected = {PK::kSwitchSpace, PK::kCreateSpace, PK::kStart};
ASSERT_TRUE(checkResult("CREATE SPACE TEST(vid_type = fixed_string(2)); USE TEST;", expected));
}
}
Expand Down
8 changes: 5 additions & 3 deletions tests/job/test_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ def test_sessions(self):
for row in resp.rows():
if bytes.decode(row.values[1].get_sVal()) == 'session_user':
session_id = row.values[0].get_iVal()
assert row.values[2].get_sVal() == b''
assert row.values[3].getType() == ttypes.Value.DTVAL
assert row.values[4].getType() == ttypes.Value.DTVAL
assert row.values[2].get_sVal() == b'', f"resp: {resp}"
assert row.values[3].getType() == ttypes.Value.DTVAL, f"resp: {resp}"
assert row.values[4].getType() == ttypes.Value.DTVAL, f"resp: {resp}"
break

assert session_id != 0
Expand All @@ -99,6 +99,8 @@ def test_sessions(self):
resp = client_ok.execute('USE nba')
self.check_resp_succeeded(resp)

# wait for session sync.
time.sleep(3)
resp = self.execute('SHOW SESSION {}'.format(session_id))
self.check_resp_succeeded(resp)
expect_col_names = ['VariableName', 'Value']
Expand Down

0 comments on commit 97be865

Please sign in to comment.