Return-Path: X-Original-To: apmail-hbase-dev-archive@www.apache.org Delivered-To: apmail-hbase-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 9C4CBEF36 for ; Mon, 14 Jan 2013 13:57:57 +0000 (UTC) Received: (qmail 18312 invoked by uid 500); 14 Jan 2013 13:57:57 -0000 Delivered-To: apmail-hbase-dev-archive@hbase.apache.org Received: (qmail 18013 invoked by uid 500); 14 Jan 2013 13:57:56 -0000 Mailing-List: contact dev-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hbase.apache.org Delivered-To: mailing list dev@hbase.apache.org Received: (qmail 17995 invoked by uid 99); 14 Jan 2013 13:57:56 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Jan 2013 13:57:56 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of nkeywal@gmail.com designates 209.85.215.49 as permitted sender) Received: from [209.85.215.49] (HELO mail-la0-f49.google.com) (209.85.215.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Jan 2013 13:57:49 +0000 Received: by mail-la0-f49.google.com with SMTP id fk20so3883220lab.36 for ; Mon, 14 Jan 2013 05:57:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=MixU6Uf/R8sUY/+fc9rCD2C9NFIT6OqSzQu8WAvxFvE=; b=PNq+GwvHrc8Lxdg6rf34tKvtXMkzUAEX4lePayBXr+nKr0eSG5FBB3+GlYLGkDAs8O yHFQshhd0/XwU5gWsr/Yp4kCAdcyP1yxrQtz4U4L1bEcrNqWQ7hKxsV20pqsXbfFLAQt h7ST24dyV24VEuwaNoiLG5pOAlW7uwiA43b1hgT/zjNes1PPxjLkNt8NgKDUi+CFBC03 p4ZN8GiO+h1lS0cpBNUWzrJRlx+DXgHhUJpg7wLWnvKxf3bwvV/SPvIysjL1uVfcUwxj 4cXpsW9VUIWtO2XcAiq+uiG3ROGJFjh7yd000ka0CKVq3uAfItAWpvtV7EY4G5zN0Qhu RtLg== Received: by 10.112.88.105 with SMTP id bf9mr8593666lbb.43.1358171848699; Mon, 14 Jan 2013 05:57:28 -0800 (PST) MIME-Version: 1.0 Received: by 10.112.8.9 with HTTP; Mon, 14 Jan 2013 05:57:08 -0800 (PST) From: Nicolas Liochon Date: Mon, 14 Jan 2013 14:57:08 +0100 Message-ID: Subject: junit 4.11 / JDK 1.7 and test methods execution order. To: dev@hbase.apache.org Content-Type: multipart/alternative; boundary=f46d04016ac795eefd04d3400657 X-Virus-Checked: Checked by ClamAV on apache.org --f46d04016ac795eefd04d3400657 Content-Type: text/plain; charset=ISO-8859-1 Hi all, In JDK 1.7, the order of the methods returned by reflection can vary. While the ordering was not guaranteed previously, it happens that it was always the same (declaration order). It's not the case anymore in JDK 1.7 Consequence for the tests: the order in which the tests are executed within a test class may vary. Because of this, JUnit 4.11 decided to execute the tests in a different order than the declaration order. That's explained here: http://randomallsorts.blogspot.fr/2012/12/junit-411-whats-new-test-execution-order.html So depending on the execution order used to be bad, but can now randomly breaks the tests, especially with jdk 1.7 and JUnit < 4.11. With JUnit 4.11, the order is determined, but different from what it used to be. So it breaks some tests. I'm currently fixing this (low priority). But it's worth knowing, especially if you port the tests from one HBase version to another. Cheers, Nicolas --f46d04016ac795eefd04d3400657--