Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 2388F200C39 for ; Thu, 16 Mar 2017 15:41:52 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 2245A160B78; Thu, 16 Mar 2017 14:41:52 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 69E7B160B7A for ; Thu, 16 Mar 2017 15:41:51 +0100 (CET) Received: (qmail 36649 invoked by uid 500); 16 Mar 2017 14:41:50 -0000 Mailing-List: contact dev-help@kafka.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@kafka.apache.org Delivered-To: mailing list dev@kafka.apache.org Received: (qmail 36638 invoked by uid 99); 16 Mar 2017 14:41:50 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Mar 2017 14:41:50 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id E9E7C1A06C1 for ; Thu, 16 Mar 2017 14:41:49 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.451 X-Spam-Level: * X-Spam-Status: No, score=1.451 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_NEUTRAL=0.652] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id zabUe4t1AC3c for ; Thu, 16 Mar 2017 14:41:48 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id A35085F238 for ; Thu, 16 Mar 2017 14:41:48 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id CF0BFE05F2 for ; Thu, 16 Mar 2017 14:41:41 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 95EF8254B8 for ; Thu, 16 Mar 2017 14:41:41 +0000 (UTC) Date: Thu, 16 Mar 2017 14:41:41 +0000 (UTC) From: "Damian Guy (JIRA)" To: dev@kafka.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Work started] (KAFKA-4594) Annotate integration tests and provide gradle build targets to run subsets of tests MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 16 Mar 2017 14:41:52 -0000 [ https://issues.apache.org/jira/browse/KAFKA-4594?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Work on KAFKA-4594 started by Damian Guy. ----------------------------------------- > Annotate integration tests and provide gradle build targets to run subsets of tests > ----------------------------------------------------------------------------------- > > Key: KAFKA-4594 > URL: https://issues.apache.org/jira/browse/KAFKA-4594 > Project: Kafka > Issue Type: Bug > Components: unit tests > Reporter: Ewen Cheslack-Postava > Assignee: Damian Guy > Priority: Minor > Labels: newbie > > It's possible to annotate unit tests and control which ones run based on these annotations. Our tests have grown to take quite a long time because we've added a lot of relatively expensive integration tests. Because these tests are all interleaved with the true unit tests and block things like checkstyle from running, we've ended up with pretty bad turn around time on feedback on simple PR issues. > We could make this a lot nicer, and encourage users to actually run some tests before submitting PRs with problems, by making it easier to get lightweight feedback based only on unit tests. We'd want to annotate integration tests (which can probably mostly be accomplished by annotating just a few shared {{*TestHarness}} classes and then setting up the build tasks and dependencies to run things in fast-fail, more user-friendly order. In particular, it'd be nice to: > a) Have gradle tasks that can run just the unit tests + checkstyle. This provides devs a *much* faster way to get at least basic feedback about whether there are problems with their PR. PR Jenkins builds will also give much faster feedback (and avoid clogging up the Jenkins slaves with lots of unnecessary work that will ultimately just fail on a unit test anyway). > b) Have the order of tests be 1) build everything and run their unit tests, 2) run checkstyle against all components, then 3) run integration tests. This could help address one of the frustrating things about checkstyle tests today, which are put after all tests to avoid annoying failures during development, but also results in a lot of folks missing simple checkstyle issues before submitting PRs. > The two obvious options I see for this are: > 1. In JUnit4 (which we currently use), use Categories. These seem to unfortunately still be under an experimental package. We pin to a specific version of JUnit, so this may not be a huge issue. But it does mean any future migration would be more painful as the annotations & integration with the test runner would need to change in the future. > 2. Wait for JUnit5 with its built-in Tag support. This would be tied to making JDK8 the minimum supported Java version. Given current plans that would mean we couldn't do this until at least 0.11.0.0. -- This message was sent by Atlassian JIRA (v6.3.15#6346)