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 BD8F1200C72 for ; Fri, 12 May 2017 18:07:09 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id BC00C160BC8; Fri, 12 May 2017 16:07:09 +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 0E971160BA3 for ; Fri, 12 May 2017 18:07:08 +0200 (CEST) Received: (qmail 16808 invoked by uid 500); 12 May 2017 16:07:08 -0000 Mailing-List: contact hdfs-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list hdfs-issues@hadoop.apache.org Received: (qmail 16797 invoked by uid 99); 12 May 2017 16:07:08 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 May 2017 16:07:08 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id A8020C0145 for ; Fri, 12 May 2017 16:07:07 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.002 X-Spam-Level: X-Spam-Status: No, score=-100.002 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id tkOW3gixwY6W for ; Fri, 12 May 2017 16:07:05 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 2DD625FB40 for ; Fri, 12 May 2017 16:07:05 +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 6EE19E01A8 for ; Fri, 12 May 2017 16:07:04 +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 2388D242EF for ; Fri, 12 May 2017 16:07:04 +0000 (UTC) Date: Fri, 12 May 2017 16:07:04 +0000 (UTC) From: "Eric Badger (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (HDFS-11818) TestBlockManager.testSufficientlyReplBlocksUsesNewRack fails intermittently MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 12 May 2017 16:07:09 -0000 Eric Badger created HDFS-11818: ---------------------------------- Summary: TestBlockManager.testSufficientlyReplBlocksUsesNewRack fails intermittently Key: HDFS-11818 URL: https://issues.apache.org/jira/browse/HDFS-11818 Project: Hadoop HDFS Issue Type: Bug Reporter: Eric Badger Saw a weird Mockito failure in last night's build with the following stack trace: {noformat} org.mockito.exceptions.misusing.WrongTypeOfReturnValue: INodeFile cannot be returned by isRunning() isRunning() should return boolean at org.apache.hadoop.hdfs.server.blockmanagement.TestBlockManager.addBlockOnNodes(TestBlockManager.java:555) at org.apache.hadoop.hdfs.server.blockmanagement.TestBlockManager.doTestSufficientlyReplBlocksUsesNewRack(TestBlockManager.java:404) at org.apache.hadoop.hdfs.server.blockmanagement.TestBlockManager.testSufficientlyReplBlocksUsesNewRack(TestBlockManager.java:397) {noformat} This is pretty confusing since we explicitly set isRunning() to return true in TestBlockManager's \@Before method {noformat} 154 Mockito.doReturn(true).when(fsn).isRunning(); {noformat} Also saw the following exception in the logs: {noformat} 2017-05-12 05:42:27,903 ERROR blockmanagement.BlockManager (BlockManager.java:run(2796)) - Error while processing replication queues async org.mockito.exceptions.base.MockitoException: 'writeLockInterruptibly' is a *void method* and it *cannot* be stubbed with a *return value*! Voids are usually stubbed with Throwables: doThrow(exception).when(mock).someVoidMethod(); If the method you are trying to stub is *overloaded* then make sure you are calling the right overloaded version. at org.apache.hadoop.hdfs.server.blockmanagement.BlockManager.processMisReplicatesAsync(BlockManager.java:2841) at org.apache.hadoop.hdfs.server.blockmanagement.BlockManager.access$100(BlockManager.java:120) at org.apache.hadoop.hdfs.server.blockmanagement.BlockManager$1.run(BlockManager.java:2792) {noformat} This is also weird since we don't do any explicit mocking with {{writeLockInterruptibly}} via fsn in the test. It has to be something changing the mocks or non-thread safe access or something like that. I can't explain the failures otherwise. -- This message was sent by Atlassian JIRA (v6.3.15#6346) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org