Ori Liel has posted comments on this change.

Change subject: engine: Add unit-tests for fence-proxy selection
......................................................................


Patch Set 1:

(2 comments)

http://gerrit.ovirt.org/#/c/36419/1/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/FenceExecutor.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/FenceExecutor.java:

Line 52:      *
Line 53:      */
Line 54:     public VDSFenceReturnValue checkStatus() {
Line 55:         VDSFenceReturnValue returnValue = null;
Line 56:         VDS proxyHost = new FenceProxyLocator(_vds, 
fencingPolicy).findProxyHost();
> what's this change?
Default is false, so better to use the empty signature. 

It's in this patch because it's a usage of FenceProxyLocator and I discovered 
it while testing FenceProxyLocator
Line 57:         if (proxyHost == null) {
Line 58:             returnValue = proxyNotFound();
Line 59:         } else {
Line 60:             for (FenceAgent agent : _vds.getFenceAgents()) {


http://gerrit.ovirt.org/#/c/36419/1/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/FenceProxyLocator.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/FenceProxyLocator.java:

Line 178:         OTHER_DC;
Line 179:     };
Line 180: 
Line 181:     public FencingPolicy getFencingPolicy() {
Line 182:         return fencingPolicy;
> Oh. I haven't noticed that the test uses that.
Yes, to make mock injection easier. It's also better design to allow 
setting/getting of this component. Tests often force a better design in the code
Line 183:     }
Line 184: 
Line 185:     public void setFencingPolicy(FencingPolicy fencingPolicy) {
Line 186:         this.fencingPolicy = fencingPolicy;


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I95f00b38c78ef7b6a72ee141d9090bf5e60eb679
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Ori Liel <[email protected]>
Gerrit-Reviewer: Eli Mesika <[email protected]>
Gerrit-Reviewer: Martin PeÅ™ina <[email protected]>
Gerrit-Reviewer: Ori Liel <[email protected]>
Gerrit-Reviewer: Oved Ourfali <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to