You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stratos.apache.org by Imesh Gunaratne <im...@apache.org> on 2015/06/26 10:33:16 UTC

[Discuss] Cloud Controller Unit Tests Failing

Hi Devs,

I see the below error in Cloud Controller while executing unit tests but it
does not detect it as a test failure:

Running
org.apache.cartridge.autoscaler.service.axiom.CloudControllerContextTest
2015-06-26 10:54:13 INFO  StratosThreadPool:58 - Thread pool created:
[type] Executor Service [id] cloud.controller.context.thread.pool [size] 10
2015-06-26 10:54:13 WARN  CloudControllerContext:739 - Unable to read cloud
controller context from the registry. Hence, any historical data will not
be reflected
java.lang.NullPointerException
at
org.apache.stratos.cloud.controller.registry.RegistryManager.getRegistry(RegistryManager.java:143)
at
org.apache.stratos.cloud.controller.registry.RegistryManager.read(RegistryManager.java:98)
at
org.apache.stratos.cloud.controller.context.CloudControllerContext.updateContextFromRegistry(CloudControllerContext.java:698)
at
org.apache.stratos.cloud.controller.context.CloudControllerContext.<init>(CloudControllerContext.java:207)
at
org.apache.stratos.cloud.controller.context.CloudControllerContext.getInstance(CloudControllerContext.java:214)
at
org.apache.cartridge.autoscaler.service.axiom.CloudControllerContextTest.testMemberContextOperations(CloudControllerContextTest.java:45)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at junit.framework.TestCase.runTest(TestCase.java:176)
at junit.framework.TestCase.runBare(TestCase.java:141)
at junit.framework.TestResult$1.protect(TestResult.java:122)
at junit.framework.TestResult.runProtected(TestResult.java:142)
at junit.framework.TestResult.run(TestResult.java:125)
at junit.framework.TestCase.run(TestCase.java:129)
at junit.framework.TestSuite.runTest(TestSuite.java:255)
at junit.framework.TestSuite.run(TestSuite.java:250)
at
org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:84)
at
org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)
at
org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)
at
org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at
org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
at
org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
at
org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
at
org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.046 sec
Running
org.apache.stratos.cloud.controller.iaases.openstack.networking.NeutronNetworkingApiTest
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.014 sec

-- 
Imesh Gunaratne

Senior Technical Lead, WSO2
Committer & PMC Member, Apache Stratos

Re: [Discuss] Cloud Controller Unit Tests Failing

Posted by Imesh Gunaratne <im...@apache.org>.
I fixed this with the following commit revision:
https://github.com/apache/stratos/commit/a42e84da8a9abe08177e4c39d63062fb03e3eb38

On Fri, Jun 26, 2015 at 2:03 PM, Imesh Gunaratne <im...@apache.org> wrote:

> Hi Devs,
>
> I see the below error in Cloud Controller while executing unit tests but
> it does not detect it as a test failure:
>
> Running
> org.apache.cartridge.autoscaler.service.axiom.CloudControllerContextTest
> 2015-06-26 10:54:13 INFO  StratosThreadPool:58 - Thread pool created:
> [type] Executor Service [id] cloud.controller.context.thread.pool [size] 10
> 2015-06-26 10:54:13 WARN  CloudControllerContext:739 - Unable to read
> cloud controller context from the registry. Hence, any historical data will
> not be reflected
> java.lang.NullPointerException
> at
> org.apache.stratos.cloud.controller.registry.RegistryManager.getRegistry(RegistryManager.java:143)
> at
> org.apache.stratos.cloud.controller.registry.RegistryManager.read(RegistryManager.java:98)
> at
> org.apache.stratos.cloud.controller.context.CloudControllerContext.updateContextFromRegistry(CloudControllerContext.java:698)
> at
> org.apache.stratos.cloud.controller.context.CloudControllerContext.<init>(CloudControllerContext.java:207)
> at
> org.apache.stratos.cloud.controller.context.CloudControllerContext.getInstance(CloudControllerContext.java:214)
> at
> org.apache.cartridge.autoscaler.service.axiom.CloudControllerContextTest.testMemberContextOperations(CloudControllerContextTest.java:45)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at junit.framework.TestCase.runTest(TestCase.java:176)
> at junit.framework.TestCase.runBare(TestCase.java:141)
> at junit.framework.TestResult$1.protect(TestResult.java:122)
> at junit.framework.TestResult.runProtected(TestResult.java:142)
> at junit.framework.TestResult.run(TestResult.java:125)
> at junit.framework.TestCase.run(TestCase.java:129)
> at junit.framework.TestSuite.runTest(TestSuite.java:255)
> at junit.framework.TestSuite.run(TestSuite.java:250)
> at
> org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:84)
> at
> org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)
> at
> org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)
> at
> org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at
> org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
> at
> org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
> at
> org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
> at
> org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
> at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
> Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.046 sec
> Running
> org.apache.stratos.cloud.controller.iaases.openstack.networking.NeutronNetworkingApiTest
> Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.014 sec
>
> --
> Imesh Gunaratne
>
> Senior Technical Lead, WSO2
> Committer & PMC Member, Apache Stratos
>



-- 
Imesh Gunaratne

Senior Technical Lead, WSO2
Committer & PMC Member, Apache Stratos