!46 [sync] PR-45: fix datetime race condition
From: @openeuler-sync-bot Reviewed-by: @jxy_git Signed-off-by: @jxy_git
This commit is contained in:
commit
cac631e9a6
6
pcs.spec
6
pcs.spec
@ -1,6 +1,6 @@
|
|||||||
Name: pcs
|
Name: pcs
|
||||||
Version: 0.11.2
|
Version: 0.11.2
|
||||||
Release: 5
|
Release: 6
|
||||||
License: GPLv2 and BSD-2-Clause and ASL 2.0 and MIT
|
License: GPLv2 and BSD-2-Clause and ASL 2.0 and MIT
|
||||||
URL: https://github.com/ClusterLabs/pcs
|
URL: https://github.com/ClusterLabs/pcs
|
||||||
Summary: Pacemaker Configuration System
|
Summary: Pacemaker Configuration System
|
||||||
@ -45,6 +45,7 @@ Patch5: Fix-typing-in-resource_agent-package.patch
|
|||||||
Patch6: fix-pcs-config-checkpoint-diff-command.patch
|
Patch6: fix-pcs-config-checkpoint-diff-command.patch
|
||||||
#https://github.com/ClusterLabs/pcs/pull/522
|
#https://github.com/ClusterLabs/pcs/pull/522
|
||||||
Patch7: fix-pcs-quorum-device-remove.patch
|
Patch7: fix-pcs-quorum-device-remove.patch
|
||||||
|
Patch8: tests-fix-datetime-race-condition.patch
|
||||||
|
|
||||||
# git for patches
|
# git for patches
|
||||||
BuildRequires: git-core
|
BuildRequires: git-core
|
||||||
@ -408,6 +409,9 @@ run_all_tests
|
|||||||
%license pyagentx_LICENSE.txt
|
%license pyagentx_LICENSE.txt
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Sep 06 2023 bizhiyuan <bizhiyuan@kylinos.cn> - 0.11.2-6
|
||||||
|
- fix datetime race condition
|
||||||
|
|
||||||
* Tue Sep 05 2023 zouzhimin <zouzhimin@kylinos.cn> - 0.11.2-5
|
* Tue Sep 05 2023 zouzhimin <zouzhimin@kylinos.cn> - 0.11.2-5
|
||||||
- Fix pcs quorum device remove
|
- Fix pcs quorum device remove
|
||||||
|
|
||||||
|
|||||||
27
tests-fix-datetime-race-condition.patch
Normal file
27
tests-fix-datetime-race-condition.patch
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
From b8e186f82cafea79e0ebf9beb1627ce0c62a8b16 Mon Sep 17 00:00:00 2001
|
||||||
|
From: bizhiyuan <bizhiyuan@kylinos.cn>
|
||||||
|
Date: Wed, 6 Sep 2023 01:02:45 +0800
|
||||||
|
Subject: [PATCH] tests: fix datetime race condition
|
||||||
|
|
||||||
|
---
|
||||||
|
pcs_test/tier1/legacy/test_constraints.py | 4 +++-
|
||||||
|
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/pcs_test/tier1/legacy/test_constraints.py b/pcs_test/tier1/legacy/test_constraints.py
|
||||||
|
index 963fbe8..90c8d7f 100644
|
||||||
|
--- a/pcs_test/tier1/legacy/test_constraints.py
|
||||||
|
+++ b/pcs_test/tier1/legacy/test_constraints.py
|
||||||
|
@@ -4709,7 +4709,9 @@ class LocationAdd(ConstraintEffect):
|
||||||
|
|
||||||
|
@skip_unless_crm_rule()
|
||||||
|
class ExpiredConstraints(ConstraintBaseTest):
|
||||||
|
- _tomorrow = (datetime.date.today() + datetime.timedelta(days=1)).strftime(
|
||||||
|
+ # Setting tomorrow to the day after tomorrow in case the tests run close to
|
||||||
|
+ # midnight.
|
||||||
|
+ _tomorrow = (datetime.date.today() + datetime.timedelta(days=2)).strftime(
|
||||||
|
"%Y-%m-%d"
|
||||||
|
)
|
||||||
|
|
||||||
|
--
|
||||||
|
2.27.0
|
||||||
|
|
||||||
Loading…
x
Reference in New Issue
Block a user