File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
samples/snippets/src/test/java/com/example/bigquery Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 2424import com .google .cloud .bigquery .StandardSQLTypeName ;
2525import java .io .ByteArrayOutputStream ;
2626import java .io .PrintStream ;
27+ import java .time .Instant ;
28+ import java .time .temporal .ChronoUnit ;
2729import java .util .UUID ;
28- import java .util .concurrent .TimeUnit ;
2930import java .util .logging .Level ;
3031import java .util .logging .Logger ;
3132import org .junit .After ;
@@ -81,7 +82,8 @@ public void tearDown() {
8182
8283 @ Test
8384 public void testUpdateTableExpiration () {
84- Long newExpiration = TimeUnit .MILLISECONDS .convert (1 , TimeUnit .DAYS );
85+ // Set new expiration to a week from Now
86+ Long newExpiration = Instant .now ().plus (7 , ChronoUnit .DAYS ).toEpochMilli ();
8587 UpdateTableExpiration .updateTableExpiration (BIGQUERY_DATASET_NAME , tableName , newExpiration );
8688 assertThat (bout .toString ()).contains ("Table expiration updated successfully" );
8789 }
You can’t perform that action at this time.
0 commit comments