Skip to content

Commit d0dfa96

Browse files
committed
Fix unit test to not depend on time of day (oops)
1 parent 2448fce commit d0dfa96

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

partitionmanager/cli_test.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -473,6 +473,7 @@ def test_bootstrap_cmd_in(self):
473473
)
474474

475475
conf = config_from_args(args)
476+
conf.assume_partitioned_on = ["id"]
476477
conf.curtime = datetime(2021, 4, 21, tzinfo=timezone.utc)
477478
self.maxDiff = None
478479

@@ -490,10 +491,10 @@ def test_bootstrap_cmd_in(self):
490491
+ "REMOVE PARTITIONING;",
491492
"ALTER TABLE partitioned_yesterday_new_20210421 "
492493
+ "PARTITION BY RANGE(id) (",
493-
"\tPARTITION p_20210802 VALUES LESS THAN MAXVALUE",
494+
"\tPARTITION p_assumed VALUES LESS THAN MAXVALUE",
494495
");",
495496
"ALTER TABLE `partitioned_yesterday_new_20210421` "
496-
+ "REORGANIZE PARTITION `p_20210802` INTO (PARTITION "
497+
+ "REORGANIZE PARTITION `p_assumed` INTO (PARTITION "
497498
+ "`p_20210421` VALUES LESS THAN (150), PARTITION "
498499
+ "`p_20210521` VALUES LESS THAN (300), PARTITION "
499500
+ "`p_20210620` VALUES LESS THAN MAXVALUE);",
@@ -515,10 +516,10 @@ def test_bootstrap_cmd_in(self):
515516
"CREATE TABLE two_new_20210421 LIKE two;",
516517
"ALTER TABLE two_new_20210421 REMOVE PARTITIONING;",
517518
"ALTER TABLE two_new_20210421 PARTITION BY RANGE(id) (",
518-
"\tPARTITION p_20201204 VALUES LESS THAN MAXVALUE",
519+
"\tPARTITION p_assumed VALUES LESS THAN MAXVALUE",
519520
");",
520521
"ALTER TABLE `two_new_20210421` REORGANIZE PARTITION "
521-
+ "`p_20201204` INTO (PARTITION `p_20210421` VALUES "
522+
+ "`p_assumed` INTO (PARTITION `p_20210421` VALUES "
522523
+ "LESS THAN (150), PARTITION `p_20210521` VALUES LESS "
523524
+ "THAN (375), PARTITION `p_20210620` VALUES LESS THAN "
524525
+ "MAXVALUE);",

0 commit comments

Comments
 (0)