incubator-cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sudha Ponnaganti <sudha.ponnaga...@citrix.com>
Subject RE: Unit tests
Date Thu, 16 Aug 2012 23:27:15 GMT
+1
It would be good if patch reviewers can ask for unit tests for defect / feature submissions
during review process

-----Original Message-----
From: Ewan Mellor [mailto:Ewan.Mellor@eu.citrix.com] 
Sent: Thursday, August 16, 2012 4:15 PM
To: cloudstack-dev@incubator.apache.org
Subject: RE: Unit tests

Thanks Chiradeep!

We now have completely passing unit-tests on master for the first time!  We should keep it
this way.  I will enable email notifications on that Jenkins job so that we will know when
they break.  I suggest though, that we make it a criterion for any patch being submitted for
review that they keep unit tests working, and preferably add unit tests, too.  Patch reviewers
should feel free now to make sure that any new code lives up to this standard.

Cheers,

Ewan.

> -----Original Message-----
> From: Chiradeep Vittal [mailto:Chiradeep.Vittal@citrix.com]
> Sent: 16 August 2012 13:05
> To: CloudStack DeveloperList
> Subject: Re: Unit tests
> 
> Fixed. One of them was obsolete, the other (NetUtils) actually caught 
> a valid failure.
> 
> On 8/10/12 4:36 PM, "Ewan Mellor" <Ewan.Mellor@eu.citrix.com> wrote:
> 
> >http://jenkins.cloudstack.org/job/test-junit, by the way.
> >
> >Ewan.
> >
> >From: Ewan Mellor
> >Sent: 10 August 2012 16:36
> >To: cloudstack-dev@incubator.apache.org
> >Subject: Unit tests
> >
> >We are down to the last two unit test failures (thanks to Mice for 
> >his recent patch which dealt with two others).
> >
> >The failures are:
> >com.cloud.agent.manager.ResourceManagerTest.testDeploy100Hosts
> >(reliable) and 
> >com.cloud.utils.net.NetUtilsTest.testGetRandomIpFromCidr
> >(50%
> >intermittent)
> >
> >Full error messages are below.  Can someone please take a look?  Mice 
> >asked for help from the core team on these ones, so I'm likely 
> >looking for someone from Citrix.
> >
> >Thanks,
> >
> >Ewan.
> >
> >    [junit] com.cloud.utils.exception.CloudRuntimeException: Unable 
> >to find DAO com.cloud.storage.dao.VMTemplateDetailsDao
> >    [junit]    at
> >com.cloud.utils.component.ComponentLocator.getDao(ComponentLocator
> .java
> >:39
> >9)
> >    [junit]    at
> >com.cloud.utils.component.ComponentLocator.getDao(ComponentLocator
> .java
> >:42
> >2)
> >    [junit]    at
> >com.cloud.utils.component.ComponentLocator.inject(ComponentLocator.j
> ava
> >:49
> >6)
> >    [junit]    at
> >com.cloud.utils.component.ComponentLocator.createInstance(Component
> Loca
> >tor
> >.java:382)
> >    [junit]    at
> >com.cloud.utils.component.ComponentLocator.startDaos(ComponentLocat
> or.j
> >ava
> >:290)
> >    [junit]    at
> >com.cloud.utils.component.ComponentLocator.parse(ComponentLocator.j
> ava:
> >246
> >)
> >    [junit]    at
> >com.cloud.utils.component.MockComponentLocator.makeActive(MockCo
> mponent
> >Loc
> >ator.java:91)
> >    [junit]    at
> >com.cloud.agent.manager.ResourceManagerTest.setUp(ResourceManager
> Test.j
> >ava
> >:319)
> >    [junit]    at junit.framework.TestCase.runBare(TestCase.java:132)
> >    [junit]    at
> >junit.framework.TestResult$1.protect(TestResult.java:110)
> >    [junit]    at
> >junit.framework.TestResult.runProtected(TestResult.java:128)
> >    [junit]    at junit.framework.TestResult.run(TestResult.java:113)
> >    [junit]    at junit.framework.TestCase.run(TestCase.java:124)
> >    [junit]    at junit.framework.TestSuite.runTest(TestSuite.java:232)
> >    [junit]    at junit.framework.TestSuite.run(TestSuite.java:227)
> >    [junit]    at
> >org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUni
> >tT
> >est
> >Runner.java:518)
> >    [junit]    at
> >org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(J
> >Un
> >itT
> >estRunner.java:1052)
> >    [junit]    at
> >org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUn
> >it
> >Tes
> >tRunner.java:906)
> >    [junit] Running com.cloud.agent.manager.ResourceManagerTest
> >
> >
> >
> >junit.framework.AssertionFailedError: This should be -1 because we 
> >ran out of ip addresses: 3232267268 expected:<3232267268> but 
> >was:<-1>
> >
> >        at
> >com.cloud.utils.net.NetUtilsTest.testGetRandomIpFromCidr(NetUtilsTest
> >.j
> >ava
> >:53)
> >


Mime
View raw message