Eli Mesika has uploaded a new change for review.

Change subject: core: fix FenceVdsBaseCommandTest test
......................................................................

core: fix FenceVdsBaseCommandTest test

Moving variable initialization from the class initialization context to
the place it really used.

Change-Id: Ibdd3efe9aa82d13aa0e0f360c50f1f6ae2c91060
Signed-off-by: Eli Mesika <emes...@redhat.com>
---
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/FenceVdsBaseCommand.java
1 file changed, 8 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/96/10496/1

diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/FenceVdsBaseCommand.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/FenceVdsBaseCommand.java
index 767415f..0681760 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/FenceVdsBaseCommand.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/FenceVdsBaseCommand.java
@@ -46,10 +46,10 @@
     protected FencingExecutor executor;
     protected List<VM> mVmList = null;
     private boolean privateFencingSucceeded;
-    private FencingExecutor primaryExecutor = new FencingExecutor(getVds(), 
getParameters().getAction());
-    private FencingExecutor secondaryExecutor = new FencingExecutor(getVds(), 
getParameters().getAction());
-    private FenceInvocationResult primaryResult = new FenceInvocationResult();
-    private FenceInvocationResult secondaryResult = new 
FenceInvocationResult();
+    private FencingExecutor primaryExecutor;
+    private FencingExecutor secondaryExecutor;
+    private FenceInvocationResult primaryResult;
+    private FenceInvocationResult secondaryResult;
 
 
     /**
@@ -243,6 +243,10 @@
      * @param lastStatus
      */
     private void handleMultipleConcurrentAgents(VDSStatus lastStatus, 
VDSReturnValue vdsReturnValue) {
+        primaryExecutor = new FencingExecutor(getVds(), 
getParameters().getAction());
+        secondaryExecutor = new FencingExecutor(getVds(), 
getParameters().getAction());
+        primaryResult = new FenceInvocationResult();
+        secondaryResult = new FenceInvocationResult();
         List<Callable<FenceInvocationResult>> tasks = new 
ArrayList<Callable<FenceInvocationResult>>();
         Future<FenceInvocationResult> f1 = null;
         Future<FenceInvocationResult> f2 = null;


--
To view, visit http://gerrit.ovirt.org/10496
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibdd3efe9aa82d13aa0e0f360c50f1f6ae2c91060
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Eli Mesika <emes...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to