From 1bd7fe0e2730ba6a667a2e35529ce220fef295d4 Mon Sep 17 00:00:00 2001 From: Roman Zolotov Date: Tue, 25 Jul 2023 17:05:52 +0300 Subject: [PATCH] ADBDEV-4011: Fix merge issue with Spring Boot Version 2.4.3 Spring Boot Version 2.4.3 adds org.mockito package with version 3.6.8. There is a bug with this version: https://github.com/mockito/mockito/pull/2545 So we need to keep additional invocation. --- .../plugins/hive/HiveMetastoreCompatibilityTest.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/server/pxf-hive/src/test/java/org/greenplum/pxf/plugins/hive/HiveMetastoreCompatibilityTest.java b/server/pxf-hive/src/test/java/org/greenplum/pxf/plugins/hive/HiveMetastoreCompatibilityTest.java index 1146bab982..ba0c9f7656 100644 --- a/server/pxf-hive/src/test/java/org/greenplum/pxf/plugins/hive/HiveMetastoreCompatibilityTest.java +++ b/server/pxf-hive/src/test/java/org/greenplum/pxf/plugins/hive/HiveMetastoreCompatibilityTest.java @@ -293,6 +293,17 @@ public void getTableFailedToConnectToMetastoreFiveRetries3rdSuccess() throws Exc } return null; }, + // placebo run through + // the second to last invocation keeps getting skipped so place this here as a placebo + // https://github.com/mockito/mockito/pull/2545 + invocation -> { + if (invocation.getMethod().getName().equals("get_table_req")) { + throw new TApplicationException("fallback ???"); + } else if (invocation.getMethod().getName().equals("get_table")) { + throw new TTransportException("oops. where's the metastore? ???"); + } + return null; + }, // final run through (retry 3 = success) invocation -> { if (invocation.getMethod().getName().equals("get_table_req")) {