Skip to content

Commit

Permalink
docs(samples): update UpdateTableExpirationIT to fix failing IT. (#1753)
Browse files Browse the repository at this point in the history
  • Loading branch information
stephaniewang526 committed Dec 16, 2021
1 parent 22a9e4c commit a62a9f4
Showing 1 changed file with 4 additions and 2 deletions.
Expand Up @@ -24,8 +24,9 @@
import com.google.cloud.bigquery.StandardSQLTypeName;
import java.io.ByteArrayOutputStream;
import java.io.PrintStream;
import java.time.Instant;
import java.time.temporal.ChronoUnit;
import java.util.UUID;
import java.util.concurrent.TimeUnit;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.junit.After;
Expand Down Expand Up @@ -81,7 +82,8 @@ public void tearDown() {

@Test
public void testUpdateTableExpiration() {
Long newExpiration = TimeUnit.MILLISECONDS.convert(1, TimeUnit.DAYS);
// Set new expiration to a week from Now
Long newExpiration = Instant.now().plus(7, ChronoUnit.DAYS).toEpochMilli();
UpdateTableExpiration.updateTableExpiration(BIGQUERY_DATASET_NAME, tableName, newExpiration);
assertThat(bout.toString()).contains("Table expiration updated successfully");
}
Expand Down

0 comments on commit a62a9f4

Please sign in to comment.