In the framework found the following problem:
in GenericDelegator.java, line 226: GenericValue kekValue = baseDelegator.findOne("TenantKeyEncryptingKey", true, "tenantId", getDelegatorTenantId()); however the key to this entity has 2 fields: <prim-key field="tenantId"/> <prim-key field="keyName"/> and further in log i get this message: Failure in findOne operation for entity [TenantKeyEncryptingKey]: org.ofbiz.entity.GenericModelException: [GenericDelegator.findOne] Passed primary key is not a valid primary key: [GenericEntity:TenantKeyEncryptingKey][tenantId,OFBIZDEMO(java.lang.String)]. Rolling back transaction. and further in the log: 2012-05-07 16:13:13,237 (Thread-0) [ ContainerLoader.java:246:INFO ] Shutting down containers the system comes to a HALT..... Regards, Hans |
I'll fix it when I get to work.
ps: there are really no test cases for tenants? -- Sent from my Android phone with K-9 Mail. Please excuse my brevity. Hans Bakker <[hidden email]> wrote: In the framework found the following problem: in GenericDelegator.java, line 226: GenericValue kekValue = baseDelegator.findOne("TenantKeyEncryptingKey", true, "tenantId", getDelegatorTenantId()); however the key to this entity has 2 fields: <prim-key field="tenantId"/> <prim-key field="keyName"/> and further in log i get this message: Failure in findOne operation for entity [TenantKeyEncryptingKey]: org.ofbiz.entity.GenericModelException: [GenericDelegator.findOne] Passed primary key is not a valid primary key: [GenericEntity:TenantKeyEncryptingKey][tenantId,OFBIZDEMO(java.lang.String)]. Rolling back transaction. and further in the log: 2012-05-07 16:13:13,237 (Thread-0) [ ContainerLoader.java:246:INFO ] Shutting down containers the system comes to a HALT..... Regards, Hans |
On 05/07/2012 09:18 AM, Adam Heath wrote:
> I'll fix it when I get to work. > > ps: there are really no test cases for tenants? ps: I have a plan for testing the tenant code. Do not start it by just 'cloning' the existing entitymodels for the tenant. That will take *way* to long. Instead, create a completely brand new base delegator, that only has one or two entity definitions in it, then add tenants for that. |
Adam,
Pleaase elaborate on what the unit test(s) should achieve? Creating new tenants and loading the tenant instantiation with demo data? Or? Regards, Pierre 2012/5/7 Adam Heath <[hidden email]> > On 05/07/2012 09:18 AM, Adam Heath wrote: > > I'll fix it when I get to work. > > > > ps: there are really no test cases for tenants? > > ps: I have a plan for testing the tenant code. Do not start it by > just 'cloning' the existing entitymodels for the tenant. That will > take *way* to long. Instead, create a completely brand new base > delegator, that only has one or two entity definitions in it, then add > tenants for that. > |
On 05/07/2012 02:46 PM, Pierre Smits wrote:
> Adam, > > Pleaase elaborate on what the unit test(s) should achieve? Creating new > tenants and loading the tenant instantiation with demo data? Or? All of the above, anything, something. There are no automated test cases *at all* for tenant anything. Every single one of the commits I just checked in recently had full tests cases run against it about 3 times. I use git-svn, rebase -i, I reorder commits radically as I get a feature set working. I'll run all test cases against a series of commits many times. Takes about 7 minutes per commit. This is why I have tools/git-rebase-runner.sh checked in. |
Adam,
Given that the tenants use the same codebase and only use a different delegator than main, you could say that performing unit tests as in a tenant delegator should get you the same results as doing them in the main delegator. But, then there would always be an uncertainty that might itch... Testing it al in a tenant environment could/would entail: 1. create the tenant 2. load the demo data into the environment (db) of the tenant through its delegator 3. trigger test suites and/or individual test in the environment of the tent through its delegator We can and could use current ant targets for items 1 and 2 mentioned above. But for item 3 a new ant target (in style of current testing targets in build.xml) should be created. Then we would be covered. Regards, Pierre 2012/5/7 Adam Heath <[hidden email]> > On 05/07/2012 02:46 PM, Pierre Smits wrote: > > Adam, > > > > Pleaase elaborate on what the unit test(s) should achieve? Creating new > > tenants and loading the tenant instantiation with demo data? Or? > > All of the above, anything, something. There are no automated test > cases *at all* for tenant anything. > > Every single one of the commits I just checked in recently had full > tests cases run against it about 3 times. I use git-svn, rebase -i, I > reorder commits radically as I get a feature set working. I'll run > all test cases against a series of commits many times. Takes about 7 > minutes per commit. This is why I have tools/git-rebase-runner.sh > checked in. > |
On 05/07/2012 03:40 PM, Pierre Smits wrote:
> Given that the tenants use the same codebase and only use a different > delegator than main, you could say that performing unit tests as in a > tenant delegator should get you the same results as doing them in the main > delegator. > > But, then there would always be an uncertainty that might itch... > > Testing it al in a tenant environment could/would entail: > > 1. create the tenant > 2. load the demo data into the environment (db) of the tenant through > its delegator > 3. trigger test suites and/or individual test in the environment of the > tent through its delegator > > We can and could use current ant targets for items 1 and 2 mentioned above. > But for item 3 a new ant target (in style of current testing targets in > build.xml) should be created. There's no reason to run *all* tests in a particular tenant. That would be useless extra work. Only test what is nescessary to verify that tenant code actually works. Use code-coverage to help with this. ps: You do realize who you are talking to? Someone who isn't a newbie with ofbiz. The tone of your responses seem to lean in that direction. |
Free forum by Nabble | Edit this page |