Nir Soffer has uploaded a new change for review.
Change subject: tests: Create all instance variables in setUp ......................................................................
tests: Create all instance variables in setUp
AcceptorTests added self.reactor attribute in start_acceptor. This leads later to AttributeError when you try to clean up stuff in tearDown if the test failed before the line adding self.reactor. Adding all instance variable in setUp avoid this issue, and make it easy to understand the state managed by the test class.
Change-Id: I0360932b3a7515fe8f87cd0ccc2cc4f6b2c90381 Signed-off-by: Nir Soffer nsoffer@redhat.com --- M tests/protocoldetectorTests.py 1 file changed, 1 insertion(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/01/65101/1
diff --git a/tests/protocoldetectorTests.py b/tests/protocoldetectorTests.py index c0c1369..887a8c6 100644 --- a/tests/protocoldetectorTests.py +++ b/tests/protocoldetectorTests.py @@ -105,6 +105,7 @@ BUFSIZE = 512
def setUp(self): + self.reactor = None self.acceptor = None self.acceptor_address = None
gerrit-hooks has posted comments on this change.
Change subject: tests: Create all instance variables in setUp ......................................................................
Patch Set 1:
* Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0'])
gerrit-hooks has posted comments on this change.
Change subject: tests: Create all instance variables in setUp ......................................................................
Patch Set 2:
* Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0'])
Piotr Kliczewski has posted comments on this change.
Change subject: tests: Create all instance variables in setUp ......................................................................
Patch Set 2: Code-Review+1
Nir Soffer has posted comments on this change.
Change subject: tests: Create all instance variables in setUp ......................................................................
Patch Set 2: Verified+1
From Dan Kenigsberg danken@redhat.com:
Dan Kenigsberg has posted comments on this change.
Change subject: tests: Create all instance variables in setUp ......................................................................
Patch Set 2: Code-Review+2
From Dan Kenigsberg danken@redhat.com:
Dan Kenigsberg has submitted this change and it was merged.
Change subject: tests: Create all instance variables in setUp ......................................................................
tests: Create all instance variables in setUp
AcceptorTests added self.reactor attribute in start_acceptor. This leads later to AttributeError when you try to clean up stuff in tearDown if the test failed before the line adding self.reactor. Adding all instance variable in setUp avoid this issue, and make it easy to understand the state managed by the test class.
Change-Id: I0360932b3a7515fe8f87cd0ccc2cc4f6b2c90381 Signed-off-by: Nir Soffer nsoffer@redhat.com Reviewed-on: https://gerrit.ovirt.org/65101 Continuous-Integration: Jenkins CI Reviewed-by: Piotr Kliczewski piotr.kliczewski@gmail.com Reviewed-by: Dan Kenigsberg danken@redhat.com --- M tests/protocoldetectorTests.py 1 file changed, 1 insertion(+), 0 deletions(-)
Approvals: Piotr Kliczewski: Looks good to me, but someone else must approve Nir Soffer: Verified Jenkins CI: Passed CI tests Dan Kenigsberg: Looks good to me, approved
vdsm-patches@lists.fedorahosted.org