Return-Path: X-Original-To: apmail-accumulo-notifications-archive@minotaur.apache.org Delivered-To: apmail-accumulo-notifications-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 29E2118C50 for ; Mon, 19 Oct 2015 21:48:28 +0000 (UTC) Received: (qmail 63761 invoked by uid 500); 19 Oct 2015 21:48:28 -0000 Delivered-To: apmail-accumulo-notifications-archive@accumulo.apache.org Received: (qmail 63698 invoked by uid 500); 19 Oct 2015 21:48:28 -0000 Mailing-List: contact notifications-help@accumulo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jira@apache.org Delivered-To: mailing list notifications@accumulo.apache.org Received: (qmail 63678 invoked by uid 99); 19 Oct 2015 21:48:27 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Oct 2015 21:48:27 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id C62D82C1F5F for ; Mon, 19 Oct 2015 21:48:27 +0000 (UTC) Date: Mon, 19 Oct 2015 21:48:27 +0000 (UTC) From: "Josh Elser (JIRA)" To: notifications@accumulo.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (ACCUMULO-4035) Spurious NamespacesIT.verifyConstraintInheritance failure MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Josh Elser created ACCUMULO-4035: ------------------------------------ Summary: Spurious NamespacesIT.verifyConstraintInheritance failure Key: ACCUMULO-4035 URL: https://issues.apache.org/jira/browse/ACCUMULO-4035 Project: Accumulo Issue Type: Bug Components: test Reporter: Josh Elser Assignee: Josh Elser Priority: Minor Fix For: 1.6.5, 1.7.1, 1.8.0 {noformat} java.lang.AssertionError: null at org.junit.Assert.fail(Assert.java:86) at org.junit.Assert.fail(Assert.java:95) at org.apache.accumulo.test.NamespacesIT.verifyConstraintInheritance(NamespacesIT.java:516) {noformat} Which lines up with the following code, the assertion failure happening on the {{fail()}} {code} c.namespaceOperations().addConstraint(namespace, constraintClassName); assertTrue(c.namespaceOperations().listConstraints(namespace).containsKey(constraintClassName)); assertTrue(c.tableOperations().listConstraints(t1).containsKey(constraintClassName)); int num = c.namespaceOperations().listConstraints(namespace).get(constraintClassName); assertEquals(num, (int) c.tableOperations().listConstraints(t1).get(constraintClassName)); // doesn't take effect immediately, needs time to propagate to tserver's ZooKeeper cache UtilWaitThread.sleep(250); Mutation m1 = new Mutation("r1"); Mutation m2 = new Mutation("r2"); Mutation m3 = new Mutation("r3"); m1.put("a", "b", new Value("abcde".getBytes(UTF_8))); m2.put("e", "f", new Value("123".getBytes(UTF_8))); m3.put("c", "d", new Value("zyxwv".getBytes(UTF_8))); BatchWriter bw = c.createBatchWriter(t1, new BatchWriterConfig()); bw.addMutations(Arrays.asList(m1, m2, m3)); try { bw.close(); fail(); } catch (MutationsRejectedException e) { assertEquals(1, e.getConstraintViolationSummaries().size()); assertEquals(2, e.getConstraintViolationSummaries().get(0).getNumberOfViolatingMutations()); } {code} Looks like this is just another case where a test poorly makes assumptions about ZK propagation. -- This message was sent by Atlassian JIRA (v6.3.4#6332)