Skip to content

Commit

Permalink
Merge pull request #1700 from dmick/wip-log-record-asctime
Browse files Browse the repository at this point in the history
Stop using LogRecord.asctime (not stable); move to pytest 6.2.5
  • Loading branch information
zmc authored Nov 23, 2021
2 parents 6cfddd5 + 5c0b3fe commit a0bc318
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ pyparsing==2.4.7
# packaging
pyperclip==1.8.2
# via cmd2
pytest==3.7.1
pytest==6.2.5
# via teuthology
python-cinderclient==8.0.0
# via python-openstackclient
Expand Down
5 changes: 1 addition & 4 deletions teuthology/test/test_misc.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import argparse
from datetime import datetime

from unittest.mock import Mock, patch
from teuthology.orchestra import cluster
Expand Down Expand Up @@ -45,9 +44,7 @@ def test_sh_progress(caplog):
# there must be at least 2 seconds between the log record
# of the first message and the log record of the second one
#
t1 = datetime.strptime(records[1].asctime.split(',')[0], "%Y-%m-%d %H:%M:%S")
t2 = datetime.strptime(records[2].asctime.split(',')[0], "%Y-%m-%d %H:%M:%S")
assert (t2 - t1).total_seconds() > 2
assert (records[2].created - records[1].created) > 2


def test_wait_until_osds_up():
Expand Down

0 comments on commit a0bc318

Please sign in to comment.