You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iceberg.apache.org by pv...@apache.org on 2021/04/26 13:38:46 UTC
[iceberg] branch master updated: Upgrade mockito version (#2514)
This is an automated email from the ASF dual-hosted git repository.
pvary pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iceberg.git
The following commit(s) were added to refs/heads/master by this push:
new 9b84b00 Upgrade mockito version (#2514)
9b84b00 is described below
commit 9b84b00a1e5268458cdb03a3c8fb3e3603178dd3
Author: Marton Bod <ma...@gmail.com>
AuthorDate: Mon Apr 26 15:38:19 2021 +0200
Upgrade mockito version (#2514)
---
.../org/apache/iceberg/aws/glue/GlueCatalogCommitFailureTest.java | 8 ++++----
.../src/test/java/org/apache/iceberg/hive/TestHiveCommits.java | 4 ++--
versions.props | 2 +-
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/aws/src/integration/java/org/apache/iceberg/aws/glue/GlueCatalogCommitFailureTest.java b/aws/src/integration/java/org/apache/iceberg/aws/glue/GlueCatalogCommitFailureTest.java
index efada18..bcdb4c3 100644
--- a/aws/src/integration/java/org/apache/iceberg/aws/glue/GlueCatalogCommitFailureTest.java
+++ b/aws/src/integration/java/org/apache/iceberg/aws/glue/GlueCatalogCommitFailureTest.java
@@ -203,9 +203,9 @@ public class GlueCatalogCommitFailureTest extends GlueTestBase {
Table table) {
// Simulate a communication error after a successful commit
Mockito.doAnswer(i -> {
- Map<String, String> mapProperties = i.getArgumentAt(1, Map.class);
+ Map<String, String> mapProperties = i.getArgument(1, Map.class);
realOps.persistGlueTable(
- i.getArgumentAt(0, software.amazon.awssdk.services.glue.model.Table.class),
+ i.getArgument(0, software.amazon.awssdk.services.glue.model.Table.class),
mapProperties);
// new metadata location is stored in map property, and used for locking
@@ -242,8 +242,8 @@ public class GlueCatalogCommitFailureTest extends GlueTestBase {
private void commitAndThrowException(GlueTableOperations realOps, GlueTableOperations spyOps) {
Mockito.doAnswer(i -> {
realOps.persistGlueTable(
- i.getArgumentAt(0, software.amazon.awssdk.services.glue.model.Table.class),
- i.getArgumentAt(1, Map.class));
+ i.getArgument(0, software.amazon.awssdk.services.glue.model.Table.class),
+ i.getArgument(1, Map.class));
throw new SdkBaseException("Datacenter on fire");
}).when(spyOps).persistGlueTable(Matchers.any(), Matchers.anyMap());
}
diff --git a/hive-metastore/src/test/java/org/apache/iceberg/hive/TestHiveCommits.java b/hive-metastore/src/test/java/org/apache/iceberg/hive/TestHiveCommits.java
index bb1b033..3548304 100644
--- a/hive-metastore/src/test/java/org/apache/iceberg/hive/TestHiveCommits.java
+++ b/hive-metastore/src/test/java/org/apache/iceberg/hive/TestHiveCommits.java
@@ -278,7 +278,7 @@ public class TestHiveCommits extends HiveTableBaseTest {
// Simulate a communication error after a successful commit
doAnswer(i -> {
org.apache.hadoop.hive.metastore.api.Table tbl =
- i.getArgumentAt(0, org.apache.hadoop.hive.metastore.api.Table.class);
+ i.getArgument(0, org.apache.hadoop.hive.metastore.api.Table.class);
realOperations.persistTable(tbl, true);
throw new TException("Datacenter on fire");
}).when(spyOperations).persistTable(any(), anyBoolean());
@@ -290,7 +290,7 @@ public class TestHiveCommits extends HiveTableBaseTest {
// Simulate a communication error after a successful commit
doAnswer(i -> {
org.apache.hadoop.hive.metastore.api.Table tbl =
- i.getArgumentAt(0, org.apache.hadoop.hive.metastore.api.Table.class);
+ i.getArgument(0, org.apache.hadoop.hive.metastore.api.Table.class);
realOperations.persistTable(tbl, true);
// Simulate lock expiration or removal
realOperations.doUnlock(lockId.get());
diff --git a/versions.props b/versions.props
index ceee38a..47e6343 100644
--- a/versions.props
+++ b/versions.props
@@ -25,7 +25,7 @@ io.quarkus:* = 1.13.1.Final
# test deps
junit:junit = 4.12
-org.mockito:mockito-core = 1.10.19
+org.mockito:mockito-core = 3.7.7
org.apache.hive:hive-exec = 2.3.8
org.apache.hive:hive-service = 2.3.8
org.apache.tez:tez-dag = 0.8.4