[ https://issues.apache.org/jira/browse/HIVE-11946?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14908537#comment-14908537 ]
Jimmy Xiang commented on HIVE-11946: ------------------------------------ Good question. Vector is synchronized while ArrayList is not. Parameter actualMessages is updated in aother thread, so the assertion method may fail if it doesn't see the change without synchronization. > TestNotificationListener is flaky > --------------------------------- > > Key: HIVE-11946 > URL: https://issues.apache.org/jira/browse/HIVE-11946 > Project: Hive > Issue Type: Test > Reporter: Jimmy Xiang > Assignee: Jimmy Xiang > Priority: Minor > Fix For: 1.3.0, 2.0.0 > > Attachments: HIVE-11946.1.patch > > > {noformat} > expected:<[CREATE_DATABASE, CREATE_TABLE, ADD_PARTITION, ALTER_PARTITION, > DROP_PARTITION, ALTER_TABLE, DROP_TABLE, DROP_DATABASE]> but > was:<[CREATE_DATABASE, CREATE_TABLE, ADD_PARTITION, ALTER_PARTITION, > DROP_PARTITION, ALTER_TABLE, DROP_TABLE]> > Stacktrace > java.lang.AssertionError: expected:<[CREATE_DATABASE, CREATE_TABLE, > ADD_PARTITION, ALTER_PARTITION, DROP_PARTITION, ALTER_TABLE, DROP_TABLE, > DROP_DATABASE]> but was:<[CREATE_DATABASE, CREATE_TABLE, ADD_PARTITION, > ALTER_PARTITION, DROP_PARTITION, ALTER_TABLE, DROP_TABLE]> > 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:144) > at > org.apache.hive.hcatalog.listener.TestNotificationListener.tearDown(TestNotificationListener.java:114) > {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)