ClickHouse/tests/testflows/datetime64_extended_range/regression.py

72 lines
4.0 KiB
Python
Raw Normal View History

#!/usr/bin/env python3
import sys
from testflows.core import *
append_path(sys.path, "..")
from helpers.cluster import Cluster
from helpers.argparser import argparser
from datetime64_extended_range.requirements import *
from datetime64_extended_range.common import *
# cross-outs
2021-04-06 22:48:09 +00:00
# https://github.com/ClickHouse/ClickHouse/issues/16581#issuecomment-804360350: 128 and 256-bit types are not supported for now
2021-04-08 12:05:10 +00:00
# https://github.com/ClickHouse/ClickHouse/issues/17079#issuecomment-783396589 : leap seconds unsupported
2021-04-07 22:03:54 +00:00
# https://github.com/ClickHouse/ClickHouse/issues/22824 : dateDiff not working woth dt64
2021-04-08 12:05:10 +00:00
# https://github.com/ClickHouse/ClickHouse/issues/22852 : formatDateTime wrong value
# https://github.com/ClickHouse/ClickHouse/issues/22854 : timeSlot(), toMonday() wrong when out of normal
# https://github.com/ClickHouse/ClickHouse/issues/16260 : timeSlots(), dateDiff() not working with DT64
2021-04-09 13:32:10 +00:00
# https://github.com/ClickHouse/ClickHouse/issues/22927#issuecomment-816574952 : toRelative...Num() wrong when out of normal range
# https://github.com/ClickHouse/ClickHouse/issues/22928 : toStartOf...() wrong when out of normal range
# https://github.com/ClickHouse/ClickHouse/issues/22929 : toUnixTimestamp() exception when out of normal
# https://github.com/ClickHouse/ClickHouse/issues/22930 : toWeek()
2021-04-10 11:54:15 +00:00
# https://github.com/ClickHouse/ClickHouse/issues/22948 : toYearWeek()
xfails = {
2021-04-07 19:10:41 +00:00
"type conversion/to int 8 16 32 64 128 256/:": [(Fail, "https://github.com/ClickHouse/ClickHouse/issues/16581#issuecomment-804360350")],
"type conversion/to uint 8 16 32 64 256/:": [(Fail, "https://github.com/ClickHouse/ClickHouse/issues/16581#issuecomment-804360350")],
"non existent time/leap seconds/:": [(Fail, "https://github.com/ClickHouse/ClickHouse/issues/17079#issuecomment-783396589")],
2021-04-07 22:03:54 +00:00
"date time funcs/date diff/:": [(Fail, "https://github.com/ClickHouse/ClickHouse/issues/22824")],
2021-04-08 12:05:10 +00:00
"date time funcs/format date time/:": [(Fail, "https://github.com/ClickHouse/ClickHouse/issues/22852")],
"date time funcs/time slot/:": [(Fail, "https://github.com/ClickHouse/ClickHouse/issues/22854")],
"date time funcs/to monday/:": [(Fail, "https://github.com/ClickHouse/ClickHouse/issues/22854")],
"date time funcs/time slots/:": [(Fail, "https://github.com/ClickHouse/ClickHouse/issues/16260")],
2021-04-09 13:32:10 +00:00
"date time funcs/to relative :/:": [(Fail, "https://github.com/ClickHouse/ClickHouse/issues/22927#issuecomment-816574952")],
"date time funcs/to start of :/:": [(Fail, "https://github.com/ClickHouse/ClickHouse/issues/22928")],
"date time funcs/to unix timestamp/:": [(Fail, "https://github.com/ClickHouse/ClickHouse/issues/22929")],
"date time funcs/to week/:": [(Fail, "https://github.com/ClickHouse/ClickHouse/issues/22930")],
2021-04-10 11:54:15 +00:00
"date time funcs/to year week/:": [(Fail, "https://github.com/ClickHouse/ClickHouse/issues/22948")],
}
@TestModule
@Name("datetime64 extended range")
@ArgumentParser(argparser)
@Specifications(
QA_SRS010_ClickHouse_DateTime64_Extended_Range
)
@Requirements(
RQ_SRS_010_DateTime64_ExtendedRange("1.0"),
)
@XFails(xfails)
def regression(self, local, clickhouse_binary_path, parallel=False, stress=False):
"""ClickHouse DateTime64 Extended Range regression module.
"""
nodes = {
"clickhouse": ("clickhouse1", "clickhouse2", "clickhouse3"),
}
with Cluster(local, clickhouse_binary_path, nodes=nodes) as cluster:
self.context.cluster = cluster
self.context.parallel = parallel
self.context.stress = stress
Scenario(run=load("datetime64_extended_range.tests.generic", "generic"), flags=TE)
Scenario(run=load("datetime64_extended_range.tests.non_existent_time", "feature"), flags=TE)
Scenario(run=load("datetime64_extended_range.tests.reference_times", "reference_times"), flags=TE)
Scenario(run=load("datetime64_extended_range.tests.date_time_functions", "date_time_funcs"), flags=TE)
Scenario(run=load("datetime64_extended_range.tests.type_conversion", "type_conversion"), flags=TE)
if main():
regression()