Vihang Karajgaonkar has posted comments on this change. ( http://gerrit.cloudera.org:8080/12365 )
Change subject: IMPALA-7976 : Add a flag to disable sync using events at a table level ...................................................................... Patch Set 8: (1 comment) http://gerrit.cloudera.org:8080/#/c/12365/8/fe/src/test/java/org/apache/impala/catalog/events/MetastoreEventsProcessorTest.java File fe/src/test/java/org/apache/impala/catalog/events/MetastoreEventsProcessorTest.java: http://gerrit.cloudera.org:8080/#/c/12365/8/fe/src/test/java/org/apache/impala/catalog/events/MetastoreEventsProcessorTest.java@815 PS8, Line 815: .thenReturn(dbFlag); > Here I wonder I we can simply define a test-only catalog service subclass t Is the concern related to using mockito in general or just to mock our own code. I think I can do away with mocking CatalogServiceCatalog here. But I may need it to mock NotificationEvent (Hive code). Will that approach be more reasonable? The first version of this test didn't use any a mocks. It was suggested in the reviews that perhaps using a fake event could make it easier. When I start going that path, I found myself writing lot of fake dependent classes which I didn't really cared as far as this test was concerned. Mockito helps a lot in such cases, since you can exercise exactly the few lines of code which you want to test without bringing in the whole lot of dependent and unrelated code. -- To view, visit http://gerrit.cloudera.org:8080/12365 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: If116edba51bae139bc003be858b3214c3f0104e3 Gerrit-Change-Number: 12365 Gerrit-PatchSet: 8 Gerrit-Owner: Vihang Karajgaonkar <vih...@cloudera.com> Gerrit-Reviewer: Bharath Krishna <bhar...@cloudera.com> Gerrit-Reviewer: Bharath Vissapragada <bhara...@cloudera.com> Gerrit-Reviewer: Impala Public Jenkins <impala-public-jenk...@cloudera.com> Gerrit-Reviewer: Paul Rogers <prog...@cloudera.com> Gerrit-Reviewer: Vihang Karajgaonkar <vih...@cloudera.com> Gerrit-Comment-Date: Wed, 13 Feb 2019 22:53:52 +0000 Gerrit-HasComments: Yes