Return-Path: X-Original-To: apmail-hadoop-hdfs-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-hdfs-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6CACD19E8B for ; Tue, 12 Apr 2016 20:33:26 +0000 (UTC) Received: (qmail 84727 invoked by uid 500); 12 Apr 2016 20:33:25 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 84667 invoked by uid 500); 12 Apr 2016 20:33:25 -0000 Mailing-List: contact hdfs-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hdfs-issues@hadoop.apache.org Delivered-To: mailing list hdfs-issues@hadoop.apache.org Received: (qmail 84629 invoked by uid 99); 12 Apr 2016 20:33:25 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Apr 2016 20:33:25 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 830A12C14F7 for ; Tue, 12 Apr 2016 20:33:25 +0000 (UTC) Date: Tue, 12 Apr 2016 20:33:25 +0000 (UTC) From: "Mingliang Liu (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HDFS-10281) o.a.h.hdfs.server.namenode.ha.TestPendingCorruptDnMessages fails intermittently MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HDFS-10281?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15237919#comment-15237919 ] Mingliang Liu commented on HDFS-10281: -------------------------------------- Basically, there is a fixed interval sleep in the test during which the test waits for the DN registration (again) along with a different uuid. The test asserts there is always a registered DN, which is not true while the DN is restarting. A simple fix would be remove the statement asserting the non-empty {{datanodesMap}}: {code} - assertEquals(1, registeredDatanodes.size()); {code} A better solution is to wait for the condition (the DN registers with a different uuid) using GenericTestUtils.waitFor. > o.a.h.hdfs.server.namenode.ha.TestPendingCorruptDnMessages fails intermittently > ------------------------------------------------------------------------------- > > Key: HDFS-10281 > URL: https://issues.apache.org/jira/browse/HDFS-10281 > Project: Hadoop HDFS > Issue Type: Bug > Components: test > Affects Versions: 2.8.0 > Reporter: Mingliang Liu > Assignee: Mingliang Liu > > In our daily UT test, we found the {{TestPendingCorruptDnMessages#testChangedStorageId}} failed intermittently, see following information: > *Error Message* > expected:<1> but was:<0> > *Stacktrace* > {code} > java.lang.AssertionError: expected:<1> but was:<0> > at org.junit.Assert.fail(Assert.java:88) > at org.junit.Assert.failNotEquals(Assert.java:743) > at org.junit.Assert.assertEquals(Assert.java:118) > at org.junit.Assert.assertEquals(Assert.java:555) > at org.junit.Assert.assertEquals(Assert.java:542) > at org.apache.hadoop.hdfs.server.namenode.ha.TestPendingCorruptDnMessages.getRegisteredDatanodeUid(TestPendingCorruptDnMessages.java:124) > at org.apache.hadoop.hdfs.server.namenode.ha.TestPendingCorruptDnMessages.testChangedStorageId(TestPendingCorruptDnMessages.java:103) > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)