Allon Mureinik has posted comments on this change.

Change subject: core: Inject TransactionSupport instead of JNDI lookups
......................................................................


Patch Set 3:

(3 comments)

http://gerrit.ovirt.org/#/c/35637/3//COMMIT_MSG
Commit Message:

Line 5: CommitDate: 2014-11-27 03:57:58 -0500
Line 6: 
Line 7: core: Inject TransactionSupport instead of JNDI lookups
Line 8: 
Line 9: TransactionSupport is now injected into command base.
s/command base/CommandBase/
Line 10: 
Line 11: No for jndi lookups which envolvs syncs on context lookup.
Line 12: 
Line 13: Also create DummyTransactionSupport for unit tests so no need for


http://gerrit.ovirt.org/#/c/35637/3/backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/storage/DeactivateStorageDomainCommandTest.java
File 
backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/storage/DeactivateStorageDomainCommandTest.java:

Line 84: 
Line 85:     private StorageDomain domain = null;
Line 86: 
Line 87: //    @ClassRule
Line 88: //    public static MockEJBStrategyRule mockEjbRule = new 
MockEJBStrategyRule();
Remove, don't comment out
Line 89: 
Line 90:     StorageDomainPoolParametersBase params = new 
StorageDomainPoolParametersBase(Guid.newGuid(), Guid.newGuid());
Line 91:     DeactivateStorageDomainCommand<StorageDomainPoolParametersBase> 
cmd =
Line 92:             spy(new 
DeactivateStorageDomainCommand<StorageDomainPoolParametersBase>(params));


Line 95:     public void setup() {
Line 96:         doReturn(dbFacade).when(cmd).getDbFacade();
Line 97:         when(dbFacade.getStoragePoolDao()).thenReturn(storagePoolDAO);
Line 98:         
when(dbFacade.getStorageDomainDao()).thenReturn(storageDomainDAO);
Line 99:         
when(cmd.getTransactionSupport()).thenReturn(transactionSupport);
This code will repeat itself in every command test... Can we please have a 
sensible util to do this?
Line 100:     }
Line 101: 
Line 102:     @Test
Line 103:     public void statusSetInMap() {


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ia2a73887c76c85b17db6a3c2683d257aece10b59
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Roy Golan <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Kanagaraj M <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Sahina Bose <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[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