You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by Marta Kuczora <ku...@cloudera.com> on 2016/11/03 15:30:24 UTC
Re: Review Request 53257: HIVE-14960: Improve the stability of
TestNotificationListener
> On Oct. 28, 2016, 11:31 a.m., Barna Zsombor Klara wrote:
> > +1.
> > Thanks for the patch.
Thanks a lot for the review.
> On Oct. 28, 2016, 11:31 a.m., Barna Zsombor Klara wrote:
> > hcatalog/server-extensions/src/test/java/org/apache/hive/hcatalog/listener/TestNotificationListener.java, line 112
> > <https://reviews.apache.org/r/53257/diff/1/?file=1548047#file1548047line112>
> >
> > nit: I would raise this up the intance level and change the countdownlatch constr argument to the size of the list.
It's a very good idea. I fixed it.
> On Oct. 28, 2016, 11:31 a.m., Barna Zsombor Klara wrote:
> > hcatalog/server-extensions/src/test/java/org/apache/hive/hcatalog/listener/TestNotificationListener.java, line 253
> > <https://reviews.apache.org/r/53257/diff/1/?file=1548047#file1548047line253>
> >
> > I would put this into a finally block. I know that the timeout will prevent the test from hanging indefinitely, but let's not wait 30s unless necessary.
You're right about this. I fixed it.
- Marta
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/53257/#review154114
-----------------------------------------------------------
On Oct. 28, 2016, 10:08 a.m., Marta Kuczora wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/53257/
> -----------------------------------------------------------
>
> (Updated Oct. 28, 2016, 10:08 a.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
> -----
>
> 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
>
>