mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 08:32:02 +00:00
Fix problem with parallel tests
This commit is contained in:
parent
178f2bbee5
commit
b2dcd61a6f
71
tests/queries/0_stateless/02883_named_collections_override.sql → tests/queries/0_stateless/02883_named_collections_override.sh
Normal file → Executable file
71
tests/queries/0_stateless/02883_named_collections_override.sql → tests/queries/0_stateless/02883_named_collections_override.sh
Normal file → Executable file
@ -1,56 +1,68 @@
|
|||||||
DROP NAMED COLLECTION IF EXISTS u1;
|
#!/usr/bin/env bash
|
||||||
DROP NAMED COLLECTION IF EXISTS u2;
|
|
||||||
DROP NAMED COLLECTION IF EXISTS u3;
|
|
||||||
|
|
||||||
CREATE NAMED COLLECTION IF NOT EXISTS u1 AS
|
CUR_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
||||||
|
# shellcheck source=../shell_config.sh
|
||||||
|
. "$CUR_DIR"/../shell_config.sh
|
||||||
|
|
||||||
|
u1="${CLICKHOUSE_TEST_UNIQUE_NAME}_collection1"
|
||||||
|
u2="${CLICKHOUSE_TEST_UNIQUE_NAME}_collection2"
|
||||||
|
u3="${CLICKHOUSE_TEST_UNIQUE_NAME}_collection3"
|
||||||
|
|
||||||
|
${CLICKHOUSE_CLIENT} -nm --query "
|
||||||
|
|
||||||
|
DROP NAMED COLLECTION IF EXISTS $u1;
|
||||||
|
DROP NAMED COLLECTION IF EXISTS $u2;
|
||||||
|
DROP NAMED COLLECTION IF EXISTS $u3;
|
||||||
|
|
||||||
|
CREATE NAMED COLLECTION IF NOT EXISTS $u1 AS
|
||||||
url = 'http://127.0.0.1:8123?query=select+1' NOT OVERRIDABLE,
|
url = 'http://127.0.0.1:8123?query=select+1' NOT OVERRIDABLE,
|
||||||
format = 'RawBLOB' OVERRIDABLE;
|
format = 'RawBLOB' OVERRIDABLE;
|
||||||
|
|
||||||
CREATE NAMED COLLECTION IF NOT EXISTS u2 AS
|
CREATE NAMED COLLECTION IF NOT EXISTS $u2 AS
|
||||||
url = 'http://127.0.0.1:8123?query=select+1',
|
url = 'http://127.0.0.1:8123?query=select+1',
|
||||||
format = 'RawBLOB';
|
format = 'RawBLOB';
|
||||||
|
|
||||||
SET allow_named_collection_override_by_default=1;
|
SET allow_named_collection_override_by_default=1;
|
||||||
SELECT 'allow_named_collection_override_by_default=1 u1';
|
SELECT 'allow_named_collection_override_by_default=1 u1';
|
||||||
SELECT * FROM url(u1);
|
SELECT * FROM url($u1);
|
||||||
SELECT * FROM url(u1, headers('Accept'='text/csv; charset=utf-8'));
|
SELECT * FROM url($u1, headers('Accept'='text/csv; charset=utf-8'));
|
||||||
SELECT * FROM url(u1, url='http://127.0.0.1:8123?query=select+2'); -- { serverError BAD_ARGUMENTS }
|
SELECT * FROM url($u1, url='http://127.0.0.1:8123?query=select+2'); -- { serverError BAD_ARGUMENTS }
|
||||||
SELECT * FROM url(u1, format='CSV');
|
SELECT * FROM url($u1, format='CSV');
|
||||||
SELECT 'allow_named_collection_override_by_default=1 u2';
|
SELECT 'allow_named_collection_override_by_default=1 u2';
|
||||||
SELECT * FROM url(u2);
|
SELECT * FROM url($u2);
|
||||||
SELECT * FROM url(u2, headers('Accept'='text/csv; charset=utf-8'));
|
SELECT * FROM url($u2, headers('Accept'='text/csv; charset=utf-8'));
|
||||||
SELECT * FROM url(u2, url='http://127.0.0.1:8123?query=select+2');
|
SELECT * FROM url($u2, url='http://127.0.0.1:8123?query=select+2');
|
||||||
SELECT * FROM url(u2, format='CSV');
|
SELECT * FROM url($u2, format='CSV');
|
||||||
|
|
||||||
SET allow_named_collection_override_by_default=0;
|
SET allow_named_collection_override_by_default=0;
|
||||||
SELECT 'allow_named_collection_override_by_default=0 u1';
|
SELECT 'allow_named_collection_override_by_default=0 u1';
|
||||||
SELECT * FROM url(u1);
|
SELECT * FROM url($u1);
|
||||||
SELECT * FROM url(u1, headers('Accept'='text/csv; charset=utf-8')); -- { serverError BAD_ARGUMENTS }
|
SELECT * FROM url($u1, headers('Accept'='text/csv; charset=utf-8')); -- { serverError BAD_ARGUMENTS }
|
||||||
SELECT * FROM url(u1, url='http://127.0.0.1:8123?query=select+2'); -- { serverError BAD_ARGUMENTS }
|
SELECT * FROM url($u1, url='http://127.0.0.1:8123?query=select+2'); -- { serverError BAD_ARGUMENTS }
|
||||||
SELECT * FROM url(u1, format='CSV');
|
SELECT * FROM url($u1, format='CSV');
|
||||||
SELECT 'allow_named_collection_override_by_default=0 u2';
|
SELECT 'allow_named_collection_override_by_default=0 u2';
|
||||||
SELECT * FROM url(u2);
|
SELECT * FROM url($u2);
|
||||||
SELECT * FROM url(u2, headers('Accept'='text/csv; charset=utf-8')); -- { serverError BAD_ARGUMENTS }
|
SELECT * FROM url($u2, headers('Accept'='text/csv; charset=utf-8')); -- { serverError BAD_ARGUMENTS }
|
||||||
SELECT * FROM url(u2, url='http://127.0.0.1:8123?query=select+2'); -- { serverError BAD_ARGUMENTS }
|
SELECT * FROM url($u2, url='http://127.0.0.1:8123?query=select+2'); -- { serverError BAD_ARGUMENTS }
|
||||||
SELECT * FROM url(u2, format='CSV'); -- { serverError BAD_ARGUMENTS }
|
SELECT * FROM url($u2, format='CSV'); -- { serverError BAD_ARGUMENTS }
|
||||||
|
|
||||||
SELECT 'Test ALTER';
|
SELECT 'Test ALTER';
|
||||||
|
|
||||||
CREATE NAMED COLLECTION IF NOT EXISTS u3 AS
|
CREATE NAMED COLLECTION IF NOT EXISTS $u3 AS
|
||||||
url = 'http://127.0.0.1:8123?query=select+1' NOT OVERRIDABLE,
|
url = 'http://127.0.0.1:8123?query=select+1' NOT OVERRIDABLE,
|
||||||
format = 'RawBLOB' OVERRIDABLE;
|
format = 'RawBLOB' OVERRIDABLE;
|
||||||
|
|
||||||
ALTER NAMED COLLECTION u3 SET
|
ALTER NAMED COLLECTION $u3 SET
|
||||||
url = 'http://127.0.0.1:8123?query=select+2' OVERRIDABLE,
|
url = 'http://127.0.0.1:8123?query=select+2' OVERRIDABLE,
|
||||||
format = 'RawBLOB' NOT OVERRIDABLE;
|
format = 'RawBLOB' NOT OVERRIDABLE;
|
||||||
|
|
||||||
SELECT * FROM url(u3);
|
SELECT * FROM url($u3);
|
||||||
SELECT * FROM url(u3, url='http://127.0.0.1:8123?query=select+1');
|
SELECT * FROM url($u3, url='http://127.0.0.1:8123?query=select+1');
|
||||||
SELECT * FROM url(u3, format='CSV'); -- { serverError BAD_ARGUMENTS }
|
SELECT * FROM url($u3, format='CSV'); -- { serverError BAD_ARGUMENTS }
|
||||||
|
|
||||||
DROP NAMED COLLECTION IF EXISTS u1;
|
DROP NAMED COLLECTION IF EXISTS $u1;
|
||||||
DROP NAMED COLLECTION IF EXISTS u2;
|
DROP NAMED COLLECTION IF EXISTS $u2;
|
||||||
DROP NAMED COLLECTION IF EXISTS u2;
|
DROP NAMED COLLECTION IF EXISTS $u2;
|
||||||
|
|
||||||
SELECT 'Test XML collections';
|
SELECT 'Test XML collections';
|
||||||
|
|
||||||
@ -77,3 +89,4 @@ SELECT * FROM url(url_override2);
|
|||||||
SELECT * FROM url(url_override2, headers('Accept'='text/csv; charset=utf-8')); -- { serverError BAD_ARGUMENTS }
|
SELECT * FROM url(url_override2, headers('Accept'='text/csv; charset=utf-8')); -- { serverError BAD_ARGUMENTS }
|
||||||
SELECT * FROM url(url_override2, url='http://127.0.0.1:8123?query=select+2'); -- { serverError BAD_ARGUMENTS }
|
SELECT * FROM url(url_override2, url='http://127.0.0.1:8123?query=select+2'); -- { serverError BAD_ARGUMENTS }
|
||||||
SELECT * FROM url(url_override2, format='CSV'); -- { serverError BAD_ARGUMENTS }
|
SELECT * FROM url(url_override2, format='CSV'); -- { serverError BAD_ARGUMENTS }
|
||||||
|
"
|
Loading…
Reference in New Issue
Block a user