incubator-cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ewan Mellor <Ewan.Mel...@eu.citrix.com>
Subject RE: Unit test failures
Date Mon, 06 Aug 2012 22:23:06 GMT
Thanks Mice, that's very helpful.  Please put that code up for review if you haven't already.
 I'll chase someone about ResourceManagerTest and see if there's someone with background knowledge
for that one.

There's one more: NetUtilsTest.testGetRandomIpFromCidr.  This is intermittent -- it's failing
approximately 50% of the time.  Does anyone know about this one?

junit.framework.AssertionFailedError: This should be -1 because we ran out of ip addresses:
3232267266 expected:<3232267266> but was:<-1>
	at com.cloud.utils.net.NetUtilsTest.testGetRandomIpFromCidr(NetUtilsTest.java:53)

Thanks,

Ewan.


> -----Original Message-----
> From: Mice Xia [mailto:mice_xia@tcloudcomputing.com]
> Sent: Monday, August 06, 2012 1:17 AM
> To: cloudstack-dev@incubator.apache.org
> Subject: RE: Unit test failures
> 
> By adding some Daos/Managers to component locators, I can pass
> SecurityGroupManagerImpl2Test and CheckPointManagerTest
> 
> But ResourceManagerTest is tough. It sets almost everything up without
> using Mock objects, which means a lot of managers/Daos and their
> cascading dependency need to be added in component locator.
> There is only one test method for createZoneCmd API will be executed.
> Can someone with background knowledge refactor it or give a direction?
> 
> Regards
> Mice
> 
> -----Original Message-----
> From: Ewan Mellor [mailto:Ewan.Mellor@eu.citrix.com]
> Sent: Saturday, August 04, 2012 9:16 AM
> To: cloudstack-dev@incubator.apache.org
> Subject: Unit test failures
> 
> Hi everyone,
> 
> We have fixed almost all of our unit tests, and we are down to 3
> failures (two of which look like the same cause).  The details are
> below. If someone has any ideas on these, then it would be greatly
> appreciated.  We need a perfect green light on unit tests before we can
> release.
> 
> Thanks,
> 
> Ewan.
> 
> http://jenkins.cloudstack.org/job/junit-test/
> http://jenkins.cloudstack.org/job/junit-test/150/consoleFull
> 
> 
>     [junit] 2012-08-03 20:57:41,104 TRACE
> [utils.component.ComponentLocator] (main:)
> Dao:com.cloud.storage.dao.VMTemplateZoneDao
>     [junit] 2012-08-03 20:57:41,104 TRACE
> [utils.component.ComponentLocator] (main:)
> Dao:com.cloud.storage.dao.VMTemplateDetailsDao
>     [junit] 2012-08-03 20:57:41,106 ERROR
> [utils.component.ComponentLocator] (main:) Problems while configuring
> DAO: VMTemplateDao
>     [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
> :365)
>     [junit]      at
> com.cloud.utils.component.ComponentLocator.getDao(ComponentLocator.java
> :388)
>     [junit]      at
> com.cloud.utils.component.ComponentLocator.inject(ComponentLocator.java
> :462)
>     [junit]      at
> com.cloud.utils.component.ComponentLocator.createInstance(ComponentLoca
> tor.java:348)
>     [junit]      at
> com.cloud.utils.component.ComponentLocator.startDaos(ComponentLocator.j
> ava:256)
>     [junit]      at
> com.cloud.utils.component.ComponentLocator.parse(ComponentLocator.java:
> 211)
>     [junit]      at
> com.cloud.utils.component.MockComponentLocator.makeActive(MockComponent
> Locator.java:89)
>     [junit]      at
> com.cloud.agent.manager.ResourceManagerTest.setUp(ResourceManagerTest.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(JUnitT
> estRunner.java:518)
>     [junit]      at
> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUn
> itTestRunner.java:1052)
>     [junit]      at
> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnit
> TestRunner.java:906)
>     [junit] Running com.cloud.agent.manager.ResourceManagerTest
>     [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0 sec
>     [junit] Test com.cloud.agent.manager.ResourceManagerTest FAILED
> (crashed)
> 
> 
> 
> 
>     [junit] 2012-08-03 20:57:46,794 INFO
> [utils.component.ComponentLocator] (main:) Starting singleton Manager:
> ClusterManager
> 
>     [junit] 2012-08-03 20:57:46,794 INFO
> [utils.component.ComponentLocator] (main:) Started Manager:
> ClusterManager
> 
>     [junit] 2012-08-03 20:57:46,795 ERROR
> [utils.component.ComponentLocator] (main:) Unable to load configuration
> for management-server from fake file
> 
>     [junit] java.lang.NullPointerException
> 
>     [junit]      at
> com.cloud.utils.component.ComponentLocator.instantiatePluggableServices
> (ComponentLocator.java:644)
> 
>     [junit]      at
> com.cloud.utils.component.ComponentLocator.parse(ComponentLocator.java:
> 223)
> 
>     [junit]      at
> com.cloud.utils.component.MockComponentLocator.makeActive(MockComponent
> Locator.java:89)
> 
>     [junit]      at
> com.cloud.cluster.CheckPointManagerTest.setUp(CheckPointManagerTest.jav
> a:64)
> 
>     [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(JUnitT
> estRunner.java:518)
> 
>     [junit]      at
> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUn
> itTestRunner.java:1052)
> 
>     [junit]      at
> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnit
> TestRunner.java:906)
> 
>     [junit] Running com.cloud.cluster.CheckPointManagerTest
> 
>     [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0 sec
> 
>     [junit] Test com.cloud.cluster.CheckPointManagerTest FAILED
> (crashed)
> 
> 
> 
>     [junit] 2012-08-03 20:58:09,955 INFO
> [utils.component.ComponentLocator] (main:) Starting singleton Manager:
> AccountManager
> 
>     [junit] 2012-08-03 20:58:09,955 INFO
> [utils.component.ComponentLocator] (main:) Started Manager:
> AccountManager
> 
>     [junit] 2012-08-03 20:58:09,956 ERROR
> [utils.component.ComponentLocator] (main:) Unable to load configuration
> for management-server from fake file
> 
>     [junit] java.lang.NullPointerException
> 
>     [junit]      at
> com.cloud.utils.component.ComponentLocator.instantiatePluggableServices
> (ComponentLocator.java:644)
> 
>     [junit]      at
> com.cloud.utils.component.ComponentLocator.parse(ComponentLocator.java:
> 223)
> 
>     [junit]      at
> com.cloud.utils.component.MockComponentLocator.makeActive(MockComponent
> Locator.java:89)
> 
>     [junit]      at
> com.cloud.network.security.SecurityGroupManagerImpl2Test.setUp(Security
> GroupManagerImpl2Test.java:76)
> 
>     [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(JUnitT
> estRunner.java:518)
> 
>     [junit]      at
> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUn
> itTestRunner.java:1052)
> 
>     [junit]      at
> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnit
> TestRunner.java:906)
> 
>     [junit] Running
> com.cloud.network.security.SecurityGroupManagerImpl2Test
> 
>     [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0 sec
> 
>     [junit] Test
> com.cloud.network.security.SecurityGroupManagerImpl2Test FAILED
> (crashed)

Mime
View raw message