Return-Path: X-Original-To: apmail-cloudstack-dev-archive@www.apache.org Delivered-To: apmail-cloudstack-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E637C17467 for ; Wed, 22 Apr 2015 12:43:39 +0000 (UTC) Received: (qmail 37177 invoked by uid 500); 22 Apr 2015 12:43:39 -0000 Delivered-To: apmail-cloudstack-dev-archive@cloudstack.apache.org Received: (qmail 37126 invoked by uid 500); 22 Apr 2015 12:43:39 -0000 Mailing-List: contact dev-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list dev@cloudstack.apache.org Received: (qmail 37110 invoked by uid 99); 22 Apr 2015 12:43:39 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Apr 2015 12:43:39 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: message received from 54.76.25.247 which is an MX secondary for dev@cloudstack.apache.org) Received: from [54.76.25.247] (HELO mx1-eu-west.apache.org) (54.76.25.247) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Apr 2015 12:43:14 +0000 Received: from smtp01.mail.pcextreme.nl (smtp01.mail.pcextreme.nl [109.72.87.137]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTP id F4032203A4 for ; Wed, 22 Apr 2015 12:43:12 +0000 (UTC) Received: from [IPv6:2001:980:7936:0:a1:6908:6cec:6894] (unknown [IPv6:2001:980:7936:0:a1:6908:6cec:6894]) by smtp01.mail.pcextreme.nl (Postfix) with ESMTPA id AB7B576163 for ; Wed, 22 Apr 2015 14:43:12 +0200 (CEST) Message-ID: <55379760.8040109@widodh.nl> Date: Wed, 22 Apr 2015 14:43:12 +0200 From: Wido den Hollander User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: dev@cloudstack.apache.org Subject: Re: [DISCUSS] Moving to Java 8 References: <59496776-F638-40A9-900A-985C35DC9CF0@schubergphilis.com> <55365576.8080706@widodh.nl> In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 04/22/2015 02:13 PM, Wilder Rodrigues wrote: > Hi Wido, > > Thanks for the reply and making a good point concerning Ubuntu > 14.04. > > Besides the difficulty in writing testes without increasing even > more out technical dept, another point on the Java 8 platform is > the EOL (end of this month) of Java 1.7. > Yes, I'm aware of that. So that makes this situation difficult. There is a bug open for backporting OpenJDK 8 to Ubuntu 14.04: https://bugs.launchpad.net/ubuntu/+source/openjdk-8/+bug/1341628 More votes there would really help. > For now I created a ticket on Apache Jira to keep track of it: > https://issues.apache.org/jira/browse/CLOUDSTACK-8397. Could you > please have a look and let me know if the content of the ticket is > appropriate? > > We will start a new sprint in 1 week and will take some time to > discuss what to do and when. Will keep the community updated on > that matter. > > Thanks a gain. > > Cheers, Wilder > > > On 21 Apr 2015, at 15:49, Wido den Hollander > > wrote: > > > > 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.5040401@shapeblue.com% 3E box/cloudstack-dev/201502.mbox/<54EEF6BE.5040401@shapeblue.com>> > > > > -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJVN5dgAAoJEAGbWC3bPspCzX8P/0o8V8ZZPF+mOiXwfvZxOoqn Xtb084SajpLvB4KFT207FecJ6rKJyJiSXZSW6esj1F5OBzoDzF30vWHityvvatCA LsY5zCj2LF01itmjK8SVXuuwK8sSINycJPu2jJVotYr4ooPM1pHJjv/UnQfrUgp3 yv8vT3VKhrPLkGOIIcRR8zmIPH6qtgTf/ILBsc9hUrkvYgfmReH1dkeQY4gid3TZ sHGrnYHby2SgW+9KbuEfdvOrHvItYbJpRWz6W3R6l+DQeZxMt/pMbZRXEM4LXkuL /t450iwybpMZzwwnPYqu0TjTjSI0AFZp9gq+obygEnbDsbCXMuUKRHNymCdUZH3r hldfP1dmAwPEjJ0Z9PgybvmitaAqvUg80BeS7iS/6SPulGx6hFiafrdCgjdQ7bxM qN4nGcFIwxmzphhljnLARxRxl2/50KuZTYmC3XmyfbrUYX+BiDW8FoMbCd5qJJyC r48w2gPQW52HyVckM532PFpMWah7If8Q0Ee9w0JrTEF3RRkMQ7NySUvK0Y9er8ay D6fmw5szuWWNF7bSC6wNx5bY7EyNGp7rDa1Ki4f4G7chh6m16yhYSQ0fLBjro6fw sFbs7EKAa9iCsyHbPQBpz3IoqkSbCknnHbXAInQOyybLKendwZ2f9LVA8K0GFlHH uMsBvF/FH1bnVg+oX8N3 =oFqF -----END PGP SIGNATURE-----