Skip to content

Commit 44544b3

Browse files
authored
Merge pull request kragniz#1962 from jkawamoto/fix_slow_watch_mock
Fix slow_watch_mock
2 parents 0d53b6c + fe2b4a0 commit 44544b3

2 files changed

Lines changed: 7 additions & 5 deletions

File tree

Dockerfile

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1-
FROM python:3.5
1+
FROM python:3.9
22

33
ARG HTTP_PROXY
44
ARG http_proxy
55
ARG HTTPS_PROXY
66
ARG https_proxy
7+
ENV TEST_ETCD_VERSION v3.3.10
78

8-
RUN curl -L http://github.com/coreos/etcd/releases/download/v3.0.10/etcd-v3.0.10-linux-amd64.tar.gz | tar xzvf -
9-
ENV PATH $PATH:/etcd-v3.0.10-linux-amd64
9+
RUN curl -L https://github.com/etcd-io/etcd/releases/download/${TEST_ETCD_VERSION}/etcd-${TEST_ETCD_VERSION}-linux-amd64.tar.gz | tar xzvf -
10+
ENV PATH $PATH:/etcd-${TEST_ETCD_VERSION}-linux-amd64
1011

1112
RUN pip install -U tox
1213

@@ -16,9 +17,9 @@ WORKDIR python-etcd3
1617
COPY tox.ini ./
1718
COPY requirements/base.txt requirements/test.txt ./requirements/
1819

19-
RUN tox -epy35 --notest
20+
RUN tox -epy39 --notest
2021

2122
COPY . ./
2223

2324
ENV ETCDCTL_API 3
24-
CMD ["tox", "-epy35"]
25+
CMD ["tox", "-epy39"]

tests/test_etcd3.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,7 @@ def test_watch_timeout_on_establishment(self, etcd):
378378

379379
def slow_watch_mock(*args, **kwargs):
380380
time.sleep(4)
381+
return []
381382

382383
foo_etcd.watcher._watch_stub.Watch = slow_watch_mock # noqa
383384

0 commit comments

Comments
 (0)