-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


On 04/21/2015 03:27 PM, Wilder Rodrigues wrote:
> Hi all,
> 
> Yesterday I started working on the LibvirtComputingResource class
> in order to apply the same patterns I used in the
> CitrixResourceBase + add more unit tests to it After 10 hours of
> work I got a bit stuck with the 1st test, which would cover the
> refactored LibvirtStopCommandWrapper. Why did I get stuck? The
> class used a few static methods that call native libraries, which I
> would like to mock. However, when writing the tests I faced
> problems with the current Mockito/PowerMock we are using: they are
> simply not enough for the task.
> 
> What did I do then? I added a dependency to EasyMock and
> PowerMock-EasyMock API. It worked almost fine, but I had to add a
> “-noverify” to both my Eclipse Runtime configuration and also to
> the cloud-plugin-hypervisor-kvm/pom.xml file. I agree that’s not
> nice, but was my first attempt of getting it to work. After trying
> to first full build I faced more problems related to
> ClassDefNotFoundExpcetion which were complaining about Mockito
> classes. I then found out that adding the PowerMockRunner to all
> the tests classes was going to be a heavy burden and would also
> mess up future changes (e.g. the -noverify flag was removed from
> Java 8, thus adding it now would be a problem soon).
> 
> Now that the first 2 paragraphs explain a bit about the problem,
> let’s get to the solution: Java 8
> 
> The VerifyError that I was getting was due to the use of the latest
> EasyMock  release (3.3.1). I tried to downgrade it to 3.1/3.2 but
> it also did not work. My decision: do not refactor if the proper
> tests cannot be added. This left me with one action: migrate to
> Java 8.
> 
> There were mentions about Java 8 in february[1] and now I will put
> some energy in making it happen.
> 
> What is your opinion on it?
> 

I'm not against it technically, but practically I am.

Ubuntu 14.04 does not ship a Java 8 JRE in the repositories.

CentOS 7 has java-1.8.0-openjdk.x86_64 available, so it would work
there. But Ubuntu is also widely used with CloudStack, so those users
couldn't use CloudStack without any additional repositories.

Since that isn't easy I would vote -1 on this if it came that far.

Wido

> Thanks in advance.
> 
> Cheers, Wilder
> 
> http://mail-archives.apache.org/mod_mbox/cloudstack-dev/201502.mbox/%3
c54eef6be.5040...@shapeblue.com%3E<http://mail-archives.apache.org/mod_m
box/cloudstack-dev/201502.mbox/<54eef6be.5040...@shapeblue.com>>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBAgAGBQJVNlV2AAoJEAGbWC3bPspCfYgQAMoXgekM6/NHXivIGLfbhekK
ghf+Ll1EFku+9IdMUdaholO0bLz7TQ+DOphr+xikVNizqakSnYCSF5wjiKQYtc+g
LCPvWhbp8UG4LjbjWdK80FPtbx0WH9OZg/XK097NQoFRNpchxRprpFoSSYJMAhqh
WjDvwfgzCITw9pqC3jI8l3Sy/i1/yv7fFRv//w4vHOqRa+4urst+dXASGer83IAX
zCJdp+SxOx2VnUDta32KJFc6CsV2rV4BW+5dPAhJad7mFd6EafngSWZRuJmjkbsq
tSiULlUAluXSnZ86FQESDhffYJdp/fkjWbmZvSRYgE+Xn5cAyB02z9ukLeJktNgq
3UjIyINiU7182IXlrRUciZXXexc8jfYCaQ8wmgOjxmpPdih0zqWBa4RWA8VCt4SM
Sw5BXO3hDjXljxrbeXs3AHSDPAslNoSDOEmKVeLYDdMWbO0Z7FvUurRuv4LKgOdE
lofDGIcUBw++AE1DuF+vIU/Gnfo61oMzY2FPvXp4V+wHekf+uet8H4MPs0Y5PFDD
9HyewO+aWEC0w8LQVAIevP8pwbArv4zX65AtSWI2IKqmwQOpvIeuB2M7sdxgoNM+
M7IMdYBC3XyIcxqYwDvevlAM0PoeUhpYY9m6fpfirlhJMXS8nBEA1H45cQQBCVDz
/uhF9CC8wnEQcb2cu+lF
=Hhwq
-----END PGP SIGNATURE-----

Reply via email to