You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by Sudharma Jain <su...@gmail.com> on 2015/12/14 07:25:32 UTC
Building Cloudstack failing on windows
While building Cloudstack on windows, it fails with following exceptions.
Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 2.052 sec
<<< FAILURE! - in com.cloud.utils.TestProfiler
testProfilerInNano(com.cloud.utils.TestProfiler) Time elapsed: 1.004 sec
<<< FAILURE!
java.lang.AssertionError: null
at org.junit.Assert.fail(Assert.java:86)
at org.junit.Assert.assertTrue(Assert.java:41)
at org.junit.Assert.assertTrue(Assert.java:52)
at
com.cloud.utils.TestProfiler.testProfilerInNano(TestProfiler.java:71)
Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.001 sec
<<< FAILURE! - in
com.cloud.hypervisor.kvm.resource.wrapper.LibvirtUtilitiesHelperTest
testSSHKeyPaths(com.cloud.hypervisor.kvm.resource.wrapper.LibvirtUtilitiesHelperTest)
Time elapsed: 0.001 sec <<< FAILURE!
junit.framework.ComparisonFailure: expected:</root/.ssh[/]id_rsa.pub.cloud>
but was:</root/.ssh[\]id_rsa.pub.cloud>
at junit.framework.Assert.assertEquals(Assert.java:100)
at junit.framework.Assert.assertEquals(Assert.java:107)
at junit.framework.TestCase.assertEquals(TestCase.java:269)
at
com.cloud.hypervisor.kvm.resource.wrapper.LibvirtUtilitiesHelperTest.testSSHKeyPaths(LibvirtUtilitiesHelperTest.java:40)
Thanks,
Sudharma
Re: Building Cloudstack failing on windows
Posted by Wido den Hollander <wi...@widodh.nl>.
On 12/14/2015 11:45 AM, Wilder Rodrigues wrote:
> no need to hard code the path. We can use the “File.separator” as it is being used in the class under test.
>
Indeed, I already filed a PR: https://github.com/apache/cloudstack/pull/1242
> Cheers,
> Wilder
>
> On 14 Dec 2015, at 11:36, Wido den Hollander <wi...@widodh.nl>> wrote:
>
>
>
> On 12/14/2015 07:25 AM, Sudharma Jain wrote:
> While building Cloudstack on windows, it fails with following exceptions.
>
> Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 2.052 sec
> <<< FAILURE! - in com.cloud.utils.TestProfiler
> testProfilerInNano(com.cloud.utils.TestProfiler) Time elapsed: 1.004 sec
> <<< FAILURE!
> java.lang.AssertionError: null
> at org.junit.Assert.fail(Assert.java:86)
> at org.junit.Assert.assertTrue(Assert.java:41)
> at org.junit.Assert.assertTrue(Assert.java:52)
> at
> com.cloud.utils.TestProfiler.testProfilerInNano(TestProfiler.java:71)
>
>
> Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.001 sec
> <<< FAILURE! - in
> com.cloud.hypervisor.kvm.resource.wrapper.LibvirtUtilitiesHelperTest
> testSSHKeyPaths(com.cloud.hypervisor.kvm.resource.wrapper.LibvirtUtilitiesHelperTest)
> Time elapsed: 0.001 sec <<< FAILURE!
> junit.framework.ComparisonFailure: expected:</root/.ssh[/]id_rsa.pub.cloud>
> but was:</root/.ssh[\]id_rsa.pub.cloud>
> at junit.framework.Assert.assertEquals(Assert.java:100)
> at junit.framework.Assert.assertEquals(Assert.java:107)
> at junit.framework.TestCase.assertEquals(TestCase.java:269)
> at
> com.cloud.hypervisor.kvm.resource.wrapper.LibvirtUtilitiesHelperTest.testSSHKeyPaths(LibvirtUtilitiesHelperTest.java:40)
>
>
> Hmm, that is a test I wrote. This is the code:
> https://github.com/apache/cloudstack/blob/master/plugins/hypervisors/kvm/test/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtUtilitiesHelperTest.java#L33
>
> I don't have Windows here, so I can't test it. But the slashes there
> seem to be a problem.
>
> This it's this:
> https://github.com/apache/cloudstack/blob/master/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java#L196
>
> I should use "File.separator" instead of a hardcoded / in the test.
>
> My bad! Fixed here: https://github.com/apache/cloudstack/pull/1242
>
> Wido
>
> Thanks,
> Sudharma
>
Re: Building Cloudstack failing on windows
Posted by Wilder Rodrigues <WR...@schubergphilis.com>.
no need to hard code the path. We can use the “File.separator” as it is being used in the class under test.
Cheers,
Wilder
On 14 Dec 2015, at 11:36, Wido den Hollander <wi...@widodh.nl>> wrote:
On 12/14/2015 07:25 AM, Sudharma Jain wrote:
While building Cloudstack on windows, it fails with following exceptions.
Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 2.052 sec
<<< FAILURE! - in com.cloud.utils.TestProfiler
testProfilerInNano(com.cloud.utils.TestProfiler) Time elapsed: 1.004 sec
<<< FAILURE!
java.lang.AssertionError: null
at org.junit.Assert.fail(Assert.java:86)
at org.junit.Assert.assertTrue(Assert.java:41)
at org.junit.Assert.assertTrue(Assert.java:52)
at
com.cloud.utils.TestProfiler.testProfilerInNano(TestProfiler.java:71)
Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.001 sec
<<< FAILURE! - in
com.cloud.hypervisor.kvm.resource.wrapper.LibvirtUtilitiesHelperTest
testSSHKeyPaths(com.cloud.hypervisor.kvm.resource.wrapper.LibvirtUtilitiesHelperTest)
Time elapsed: 0.001 sec <<< FAILURE!
junit.framework.ComparisonFailure: expected:</root/.ssh[/]id_rsa.pub.cloud>
but was:</root/.ssh[\]id_rsa.pub.cloud>
at junit.framework.Assert.assertEquals(Assert.java:100)
at junit.framework.Assert.assertEquals(Assert.java:107)
at junit.framework.TestCase.assertEquals(TestCase.java:269)
at
com.cloud.hypervisor.kvm.resource.wrapper.LibvirtUtilitiesHelperTest.testSSHKeyPaths(LibvirtUtilitiesHelperTest.java:40)
Hmm, that is a test I wrote. This is the code:
https://github.com/apache/cloudstack/blob/master/plugins/hypervisors/kvm/test/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtUtilitiesHelperTest.java#L33
I don't have Windows here, so I can't test it. But the slashes there
seem to be a problem.
This it's this:
https://github.com/apache/cloudstack/blob/master/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java#L196
I should use "File.separator" instead of a hardcoded / in the test.
My bad! Fixed here: https://github.com/apache/cloudstack/pull/1242
Wido
Thanks,
Sudharma
Re: Building Cloudstack failing on windows
Posted by Wido den Hollander <wi...@widodh.nl>.
On 12/14/2015 07:25 AM, Sudharma Jain wrote:
> While building Cloudstack on windows, it fails with following exceptions.
>
> Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 2.052 sec
> <<< FAILURE! - in com.cloud.utils.TestProfiler
> testProfilerInNano(com.cloud.utils.TestProfiler) Time elapsed: 1.004 sec
> <<< FAILURE!
> java.lang.AssertionError: null
> at org.junit.Assert.fail(Assert.java:86)
> at org.junit.Assert.assertTrue(Assert.java:41)
> at org.junit.Assert.assertTrue(Assert.java:52)
> at
> com.cloud.utils.TestProfiler.testProfilerInNano(TestProfiler.java:71)
>
>
> Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.001 sec
> <<< FAILURE! - in
> com.cloud.hypervisor.kvm.resource.wrapper.LibvirtUtilitiesHelperTest
> testSSHKeyPaths(com.cloud.hypervisor.kvm.resource.wrapper.LibvirtUtilitiesHelperTest)
> Time elapsed: 0.001 sec <<< FAILURE!
> junit.framework.ComparisonFailure: expected:</root/.ssh[/]id_rsa.pub.cloud>
> but was:</root/.ssh[\]id_rsa.pub.cloud>
> at junit.framework.Assert.assertEquals(Assert.java:100)
> at junit.framework.Assert.assertEquals(Assert.java:107)
> at junit.framework.TestCase.assertEquals(TestCase.java:269)
> at
> com.cloud.hypervisor.kvm.resource.wrapper.LibvirtUtilitiesHelperTest.testSSHKeyPaths(LibvirtUtilitiesHelperTest.java:40)
>
Hmm, that is a test I wrote. This is the code:
https://github.com/apache/cloudstack/blob/master/plugins/hypervisors/kvm/test/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtUtilitiesHelperTest.java#L33
I don't have Windows here, so I can't test it. But the slashes there
seem to be a problem.
This it's this:
https://github.com/apache/cloudstack/blob/master/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java#L196
I should use "File.separator" instead of a hardcoded / in the test.
My bad! Fixed here: https://github.com/apache/cloudstack/pull/1242
Wido
> Thanks,
> Sudharma
>