Skip to content

Commit

Permalink
Append unixtime millis to the test db name when using Cloud (ClickHou…
Browse files Browse the repository at this point in the history
…se#50)

* Append unixtime millis to the test db name when using Cloud

* Fix create_db database name

* Update ignored test branches

Co-authored-by: Geoff Genz <[email protected]>
  • Loading branch information
slvrtrn and genzgd authored Oct 5, 2022
1 parent 93a2382 commit fc40705
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/on_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ name: 'Lint and Test'
on:
push:
branches-ignore:
- '*test*'
- '*dev*'
- '*build*'
- '*_test'
- '*_dev'
- '*_build'
paths-ignore:
- 'README.md'
- 'CHANGELOG.md'
Expand Down
2 changes: 1 addition & 1 deletion tests/integration_tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def test_config_fixture(request) -> Iterator[TestConfig]:
elif use_docker:
test_database = 'ch_connect_test'
else:
test_database = f'ch_connect_{int(time.time())}_{random.randint(100000, 999999)}'
test_database = f'ch_connect__{random.randint(100000, 999999)}__{int(time.time() * 1000)}'
yield TestConfig(interface, host, port, username, password, use_docker, test_database, cleanup, local, cloud)


Expand Down
2 changes: 1 addition & 1 deletion tests/integration_tests/test_sqlalchemy/test_ddl.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
def test_create_database(test_engine: Engine, test_db: str, test_table_engine: str):
if test_db:
conn = test_engine.connect()
create_db = f'{test_db}_create_db_test'
create_db = f'create_db_{test_db}'
if not test_engine.dialect.has_database(conn, create_db):
if test_table_engine == 'ReplicatedMergeTree':
conn.execute(CreateDatabase(create_db))
Expand Down

0 comments on commit fc40705

Please sign in to comment.