hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marta Kuczora <kuczo...@cloudera.com>
Subject Re: Review Request 53257: HIVE-14960: Improve the stability of TestNotificationListener
Date Thu, 03 Nov 2016 15:30:59 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/53257/
-----------------------------------------------------------

(Updated Nov. 3, 2016, 3:30 p.m.)


Review request for hive, Aihua Xu, Chaoyu Tang, Peter Vary, and Barna Zsombor Klara.


Bugs: HIVE-14960
    https://issues.apache.org/jira/browse/HIVE-14960


Repository: hive-git


Description
-------

The TestNotificationListener test fails occasionally. It happens if the testAMQListener method
is completed and the recevied messages are checked before the last "DROP_TABLE" message got
processed and put to the "actualMessages" list by the onMessage method. 
As a solution I used a CountDownLatch which count is decreased by 1 when a message is processed.
And the "testAMQListener" method will wait for the Latch to reach zero or a maximum time limit
before complete.


Diffs (updated)
-----

  hcatalog/server-extensions/src/test/java/org/apache/hive/hcatalog/listener/TestNotificationListener.java
9e03da4 

Diff: https://reviews.apache.org/r/53257/diff/


Testing
-------

The change effects only a unit test.
Ran the test many times locally.
Added random sleeps to simulate the delay of the message processing.


Thanks,

Marta Kuczora


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message