Return-Path: X-Original-To: apmail-poi-dev-archive@www.apache.org Delivered-To: apmail-poi-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 B001018A19 for ; Sun, 3 Jan 2016 09:31:13 +0000 (UTC) Received: (qmail 9146 invoked by uid 500); 3 Jan 2016 09:31:08 -0000 Delivered-To: apmail-poi-dev-archive@poi.apache.org Received: (qmail 9088 invoked by uid 500); 3 Jan 2016 09:31:08 -0000 Mailing-List: contact dev-help@poi.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "POI Developers List" Delivered-To: mailing list dev@poi.apache.org Received: (qmail 9076 invoked by uid 99); 3 Jan 2016 09:31:08 -0000 Received: from Unknown (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 Jan 2016 09:31:08 +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 BB4841A0C75 for ; Sun, 3 Jan 2016 09:31:07 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.12 X-Spam-Level: X-Spam-Status: No, score=-0.12 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id 6bPBPd1Onrd9 for ; Sun, 3 Jan 2016 09:31:01 +0000 (UTC) Received: from mail-oi0-f46.google.com (mail-oi0-f46.google.com [209.85.218.46]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTPS id 3FF0C24D8E for ; Sun, 3 Jan 2016 09:31:00 +0000 (UTC) Received: by mail-oi0-f46.google.com with SMTP id o62so236252676oif.3 for ; Sun, 03 Jan 2016 01:31:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=lKx+vRij58ywD8nVv/8bvu0aXwLayzHuyW2/80BXBOE=; b=BR7TlTSJbzK/tD3zcwgctln19pMFOnBvoHStMiQ9Sot5l+ffPpyJGtx6K6imbDemZK MhFwXqcnH4CilGW0jFwihL2Qjpi0YREgv59DOzEsty+4erEy9daU/nVdCgAWElF6AXkq kJQTcIg69Ljh2NiHJAnDFqnwkg5cZiYxfuTK7+vkM2LsaaCed5HFIR2B/0sB/384BSXS 9Grhx2K3EhzVwn2wjGAlimAsO+t6lFejsicnWEnBp27FSzxE+q0GpjyGOo4tQkIQXNqF Ha12qdqLotG6+x9kpDLxSUjjF2rIRCfIp+jsn+p14ai9zBUSIpjcJwj5BKKWkFZGNZn0 CuUg== X-Received: by 10.202.203.73 with SMTP id b70mr53094563oig.108.1451813453003; Sun, 03 Jan 2016 01:30:53 -0800 (PST) MIME-Version: 1.0 Received: by 10.202.211.202 with HTTP; Sun, 3 Jan 2016 01:30:13 -0800 (PST) In-Reply-To: References: From: "Javen O'Neal" Date: Sun, 3 Jan 2016 01:30:13 -0800 Message-ID: Subject: Re: Detecting when ignored unit tests pass To: POI Developers List Content-Type: text/plain; charset=UTF-8 Here's a working example of what I was talking about. This will break the build as soon as the bug is patched (prompting a unit test update). Because this unit test is run, any side-effects it has also occur, which differs from not running the unit test altogether. In this case, the side effect is modifying /test-data/slideshow/SampleShow.pptx. https://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/xslf/usermodel/TestXSLFSlideShowFactory.java?r1=1722707&r2=1722706&pathrev=1722707 public final class TestXSLFSlideShowFactory extends BaseTestSlideShowFactory { private static final String removeExpectedExceptionMsg = "This functionality this unit test is trying to test is now passing. " + "The unit test needs to be updated by deleting the expected exception code. Status and close any related bugs."; @Rule public ExpectedException thrown = ExpectedException.none(); @Test public void testFactoryFromFile() throws Exception { // Remove thrown.* when bug 58779 is resolved thrown.expect(AssertionError.class); thrown.expectMessage("SampleShow.pptx sample file was modified as a result of closing the slideshow"); thrown.reportMissingExceptionWithMessage("Bug 58779: " + removeExpectedExceptionMsg); testFactoryFromFile(filename); } } On Sat, Jan 2, 2016 at 5:11 PM, Javen O'Neal wrote: > On Sat, Jan 2, 2016 at 2:54 PM, Dominik Stadler wrote: >> Adding a test-suite which looks at bugzilla will cause additional >> web-accesses during CI runs and might cause unstability if bugzilla is >> down/unreachable/flaky or changes web-address (just happened a year >> ago!)... I saw this being used locally at my company but am not sure if it >> is a good idea for an open source project where code is built all over the >> place. > > I was thinking of mentioning the bug number in the error message, but > assume the user will figure out what the bug URL is and change the > status as needed. No need to integrate bugzilla with the test suite. > Unit tests should be able to be run without an internet connection. If > the test is named something like "test12345" or "bug12345", someone > might be able to figure out what this is about--but we need to be > crystal clear that if the test breaks, it's because the broken feature > now works as expected, not because a working feature broke, and to fix > the unit test rather than the Java code. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org For additional commands, e-mail: dev-help@poi.apache.org