Skip to content

Commit

Permalink
fix: skip test on emulator + remove deprecated code
Browse files Browse the repository at this point in the history
  • Loading branch information
olavloite committed Mar 10, 2021
1 parent e591b57 commit ad22087
Showing 1 changed file with 5 additions and 2 deletions.
Expand Up @@ -16,18 +16,20 @@

package com.google.cloud.spanner.jdbc.it;

import static com.google.cloud.spanner.testing.EmulatorSpannerHelper.isUsingEmulator;
import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import static org.junit.Assume.assumeFalse;

import com.google.api.client.util.Base64;
import com.google.cloud.spanner.IntegrationTest;
import com.google.cloud.spanner.jdbc.ITAbstractJdbcTest;
import com.google.common.base.Strings;
import com.google.common.io.BaseEncoding;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.StringReader;
Expand Down Expand Up @@ -223,7 +225,7 @@ private static Long[] parseLongArray(String value) {
}

private static byte[] parseBytes(String value) {
return Base64.decodeBase64(value);
return BaseEncoding.base64().decode(value);
}

private List<Singer> createSingers() {
Expand Down Expand Up @@ -828,6 +830,7 @@ public void test08_InsertAllColumnTypes() throws SQLException {

@Test
public void test09_MetaData_FromQuery() throws SQLException {
assumeFalse("The emulator does not support PLAN mode", isUsingEmulator());
try (Connection con = createConnection()) {
try (PreparedStatement ps =
con.prepareStatement("SELECT * FROM TableWithAllColumnTypes WHERE ColInt64=?")) {
Expand Down

0 comments on commit ad22087

Please sign in to comment.