mirror of
https://github.com/google/nomulus.git
synced 2025-07-24 19:48:32 +02:00
Fix type-inference issues in our FOSS build
Fix a few uses of Optional and any() in the IcannReporting test drivers so that they work on bazel in JDK7. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=164888832
This commit is contained in:
parent
4de8d3eae1
commit
e45010f667
2 changed files with 4 additions and 4 deletions
|
@ -77,13 +77,13 @@ public class IcannReportingStagingActionTest {
|
|||
|
||||
@Test
|
||||
public void testRunSuccess() throws Exception {
|
||||
when(bigquery.query(any(), any())).thenReturn(fakeFuture());
|
||||
when(bigquery.query(any(String.class), any(DestinationTable.class))).thenReturn(fakeFuture());
|
||||
DestinationTable.Builder tableBuilder = new DestinationTable.Builder()
|
||||
.datasetId("testdataset")
|
||||
.type(TableType.TABLE)
|
||||
.name("tablename")
|
||||
.overwrite(true);
|
||||
when(bigquery.buildDestinationTable(any())).thenReturn(tableBuilder);
|
||||
when(bigquery.buildDestinationTable(any(String.class))).thenReturn(tableBuilder);
|
||||
|
||||
ImmutableTable<Integer, TableFieldSchema, Object> reportTable =
|
||||
new ImmutableTable.Builder<Integer, TableFieldSchema, Object>()
|
||||
|
@ -94,7 +94,7 @@ public class IcannReportingStagingActionTest {
|
|||
.put(2, new TableFieldSchema().setName("fooField"), "56")
|
||||
.put(2, new TableFieldSchema().setName("barField"), "78")
|
||||
.build();
|
||||
when(bigquery.queryToLocalTableSync(any())).thenReturn(reportTable);
|
||||
when(bigquery.queryToLocalTableSync(any(String.class))).thenReturn(reportTable);
|
||||
IcannReportingStagingAction action = createAction();
|
||||
action.run();
|
||||
|
||||
|
|
|
@ -172,7 +172,7 @@ public class IcannReportingUploadActionTest {
|
|||
public void testSuccess_CreateBucketname() throws Exception{
|
||||
assertThat(
|
||||
IcannReportingUploadAction
|
||||
.createReportingBucketName("gs://my-reporting", Optional.absent(), "2017-05"))
|
||||
.createReportingBucketName("gs://my-reporting", Optional.<String>absent(), "2017-05"))
|
||||
.isEqualTo("gs://my-reporting/icann/monthly/2017-05");
|
||||
assertThat(
|
||||
IcannReportingUploadAction
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue