You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by "veghlaci05 (via GitHub)" <gi...@apache.org> on 2023/03/06 08:10:56 UTC

[GitHub] [hive] veghlaci05 commented on a diff in pull request #4096: HIVE-27117: Fix compaction related flaky tests

veghlaci05 commented on code in PR #4096:
URL: https://github.com/apache/hive/pull/4096#discussion_r1126062935


##########
itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/txn/compactor/CompactorOnTezTest.java:
##########
@@ -185,23 +187,32 @@ protected void verifySuccessfulCompaction(int expectedSuccessfulCompactions) thr
   }
 
   protected HiveHookEvents.HiveHookEventProto getRelatedTezEvent(String dbTableName) throws Exception {
-    List<ProtoMessageReader<HiveHookEvents.HiveHookEventProto>> readers = TestHiveProtoLoggingHook.getTestReader(conf, tmpFolder);
-    for (ProtoMessageReader<HiveHookEvents.HiveHookEventProto> reader : readers) {
-      HiveHookEvents.HiveHookEventProto event = reader.readEvent();
-      boolean getRelatedEvent = false;
-      while (!getRelatedEvent) {
-        while (event != null && ExecutionMode.TEZ != ExecutionMode.valueOf(event.getExecutionMode())) {
-          event = reader.readEvent();
+    int retryCount = 3;
+    while (retryCount-- > 0) {
+      try {
+        List<ProtoMessageReader<HiveHookEvents.HiveHookEventProto>> readers = TestHiveProtoLoggingHook.getTestReader(conf, tmpFolder);

Review Comment:
   Unofrtunately not possible, the problem here that I cannot mock the Event processing part to  release the latch.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org