Merge pull request #102 from gunnarmorling/DBZ-1424

DBZ-1424 Removing unused dependencies from Cassandra connector;
This commit is contained in:
Joy Gao 2019-08-09 00:43:47 -07:00 committed by GitHub
commit e7348c9c3b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 45 deletions

View File

@ -24,7 +24,7 @@
<dependency>
<groupId>io.confluent</groupId>
<artifactId>kafka-avro-serializer</artifactId>
<version>5.1.2</version>
<version>${version.confluent.platform}</version>
</dependency>
<dependency>
<groupId>com.datastax.cassandra</groupId>
@ -61,16 +61,6 @@
<artifactId>jetty-servlet</artifactId>
<version>9.4.12.v20180830</version>
</dependency>
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>annotations</artifactId>
<version>3.0.1</version>
</dependency>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-storage</artifactId>
<version>1.70.0</version>
</dependency>
<!-- Testing -->
<dependency>

View File

@ -1,34 +0,0 @@
/*
* Copyright Debezium Authors.
*
* Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
*/
package io.debezium.connector.cassandra;
import com.google.api.client.googleapis.json.GoogleJsonError;
import com.google.api.client.googleapis.json.GoogleJsonResponseException;
import com.google.api.client.http.HttpHeaders;
import com.google.api.client.http.HttpResponseException;
import com.google.cloud.storage.StorageException;
/**
* Miscellaneous utility methods for unit testing.
*/
public final class TestUtils {
private TestUtils() { }
/**
* Generate a {@link StorageException} with a specified error code
* @param code error code
* @return a storage exception
*/
public static StorageException generateGoogleStorageException(int code) {
GoogleJsonError jsonError = new GoogleJsonError();
jsonError.setCode(code);
jsonError.setMessage("n/a");
HttpResponseException.Builder builder = new HttpResponseException.Builder(code, "n/a", new HttpHeaders());
GoogleJsonResponseException jsonResponseException = new GoogleJsonResponseException(builder, jsonError);
return new StorageException(jsonResponseException);
}
}