Closed zhangweidev closed 3 months ago
Need to look into this ci error(not related to this change)
It's caused by the new compose container naming rule, fixing with d47e871
Error response from daemon: No such container: tests_graphd0_1
Error: failed to start containers: tests_graphd0_1
FAILED
=================================== FAILURES ===================================
________________________ test_remove_invalid_connection ________________________
def test_remove_invalid_connection():
addresses = [("127.0.0.1", 9669), ("127.0.0.1", 9670), ("127.0.0.1", 9671)]
configs = Config()
configs.min_connection_pool_size = 30
configs.max_connection_pool_size = 45
pool = ConnectionPool()
try:
assert pool.init(addresses, configs)
# turn down one server('127.0.0.1', 9669) so the connection to it is invalid
os.system("docker stop tests_graphd0_1")
time.sleep(3)
# get connection from the pool, we should be able to still get 30 connections even though one server is down
for i in range(0, 30):
conn = pool.get_connection()
assert conn is not None
# total connection should still be 30
assert pool.connects() == 30
# the number of connections to the down server should be 0
> assert len(pool._connections[addresses[0]]) == 0
E assert 10 == 0
E + where 10 = len(deque([<nebula3.gclient.net.Connection.Connection object at 0x7f4debc84700>, <nebula3.gclient.net.Connection.Connection object at 0x7f4dec88cf10>, <nebula3.gclient.net.Connection.Connection object at 0x7f4dec880a30>, <nebula3.gclient.net.Connection.Connection object at 0x7f4decd3c190>, <nebula3.gclient.net.Connection.Connection object at 0x7f4decd54df0>, <nebula3.gclient.net.Connection.Connection object at 0x7f4decd54400>, ...]))
tests/test_pool.py:298: AssertionError
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 75.27%. Comparing base (
6672e51
) to head (c21b05e
).
:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@Nicole00
Only one line of change, other changes are due to github action runner change, caused docker-compose broken in Ubuntu 22.04.
What type of PR is this?
What problem(s) does this PR solve?
Issue(s) number:
Description:
函数 cast_primitive 的 data 类型转换应该是 DVAL
How do you solve it?
DTVAL -> DVAL
Special notes for your reviewer, ex. impact of this fix, design document, etc: