Merge lp:~stragerneds/duplicity/duplicity into lp:~duplicity-team/duplicity/0.8-series

Proposed by Matthew Glazar
Status: Merged
Merged at revision: 1368
Proposed branch: lp:~stragerneds/duplicity/duplicity
Merge into: lp:~duplicity-team/duplicity/0.8-series
Diff against target: 32 lines (+10/-5)
1 file modified
testing/functional/__init__.py (+10/-5)
To merge this branch: bzr merge lp:~stragerneds/duplicity/duplicity
Reviewer Review Type Date Requested Status
duplicity-team Pending
Review via email: mp+367934@code.launchpad.net
To post a comment you must log in.
lp:~stragerneds/duplicity/duplicity updated
1367. By Kenneth Loafman

* Fix TestGlobToRegex.test_glob_to_regex for py3.6 and above
  - see https://bugs.python.org/issue29995 for details

1368. By Kenneth Loafman

* Merged in lp:~stragerneds/duplicity/duplicity
  - improve test backup speed
  - insure all test output is read

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'testing/functional/__init__.py'
2--- testing/functional/__init__.py 2018-11-29 19:00:15 +0000
3+++ testing/functional/__init__.py 2019-05-26 00:32:44 +0000
4@@ -145,9 +145,10 @@
5
6 # if the command fails, we need to clear its output
7 # so it will terminate cleanly.
8- lines = []
9- while child.isalive():
10- lines.append(child.readline())
11+ child.expect_exact(pexpect.EOF)
12+ lines = child.before.splitlines()
13+ child.wait()
14+ child.ptyproc.delayafterclose = 0.0
15 return_val = child.exitstatus
16
17 if fail:
18@@ -171,8 +172,12 @@
19 # If a chain ends with time X and the next full chain begins at time X,
20 # we may trigger an assert in collections.py. If needed, sleep to
21 # avoid such problems
22- if self.last_backup == int(time.time()):
23- time.sleep(1)
24+ now = time.time()
25+ if self.last_backup == int(now):
26+ seconds_to_sleep = (self.last_backup + 1) - now
27+ assert 0 <= seconds_to_sleep <= 1
28+ time.sleep(seconds_to_sleep)
29+ assert int(time.time()) != self.last_backup
30
31 result = self.run_duplicity(options=options, **kwargs)
32 self.last_backup = int(time.time())

Subscribers

People subscribed via source and target branches