chore(style): remove var and inline qualified names from more files no open PR touches (#6768)

Each var now names the type javac inferred for it, and each fully qualified type name is
imported instead. The suppression list keeps only the files that open pull requests edit.
This commit is contained in:
TATSUNO “Taz” Yasuhiro authored and GitHub committed 2026-10-27 17:53:15 -05:00
1 parent 32cbf73adc
commit 3370d0ff62
18 files changed
+97 -97

No files matched your search

@@ -2,6 +2,7 @@ package io.github.hectorvent.floci.services.apigateway;
import io.quarkus.test.junit.QuarkusTest;
import io.restassured.http.ContentType;
import org.hamcrest.Matchers;
import org.junit.jupiter.api.MethodOrderer;
import org.junit.jupiter.api.Order;
import org.junit.jupiter.api.Test;
@@ -94,14 +95,14 @@ class ApiGatewayApiKeyRequiredIntegrationTest {
.body("{\"authorizationType\":\"NONE\",\"apiKeyRequired\":true}")
.when().put("/restapis/" + apiId + "/resources/" + protectedResourceId + "/methods/GET")
.then().statusCode(201)
.body("apiKeyRequired", org.hamcrest.Matchers.is(true));
.body("apiKeyRequired", Matchers.is(true));
given()
.contentType(ContentType.JSON)
.body("{\"authorizationType\":\"NONE\"}")
.when().put("/restapis/" + apiId + "/resources/" + openResourceId + "/methods/GET")
.then().statusCode(201)
.body("apiKeyRequired", org.hamcrest.Matchers.is(false));
.body("apiKeyRequired", Matchers.is(false));
String uri = "arn:aws:apigateway:" + REGION + ":lambda:path/2015-03-31/functions/"
+ "arn:aws:lambda:" + REGION + ":" + ACCOUNT + ":function:" + ECHO_FUNCTION + "/invocations";
@@ -169,7 +170,7 @@ class ApiGatewayApiKeyRequiredIntegrationTest {
.when().get("/execute-api/" + apiId + "/prod/secret")
.then().statusCode(403)
.header("x-amzn-ErrorType", equalTo("ForbiddenException"))
.body("message", org.hamcrest.Matchers.is("Forbidden"));
.body("message", Matchers.is("Forbidden"));
}
@Test @Order(5)
@@ -179,7 +180,7 @@ class ApiGatewayApiKeyRequiredIntegrationTest {
.when().get("/execute-api/" + apiId + "/prod/secret")
.then().statusCode(403)
.header("x-amzn-ErrorType", equalTo("ForbiddenException"))
.body("message", org.hamcrest.Matchers.is("Forbidden"));
.body("message", Matchers.is("Forbidden"));
}
@Test @Order(6)
@@ -188,7 +189,7 @@ class ApiGatewayApiKeyRequiredIntegrationTest {
.header("x-api-key", keyValue)
.when().get("/execute-api/" + apiId + "/prod/secret")
.then().statusCode(200)
.body("ok", org.hamcrest.Matchers.is(true));
.body("ok", Matchers.is(true));
}
@Test @Order(7)
@@ -196,7 +197,7 @@ class ApiGatewayApiKeyRequiredIntegrationTest {
given()
.when().get("/execute-api/" + apiId + "/prod/public")
.then().statusCode(200)
.body("ok", org.hamcrest.Matchers.is(true));
.body("ok", Matchers.is(true));
}
@Test @Order(8)
@@ -242,7 +243,7 @@ class ApiGatewayApiKeyRequiredIntegrationTest {
""")
.when().patch("/restapis/" + apiId + "/resources/" + protectedResourceId + "/methods/GET")
.then().statusCode(200)
.body("apiKeyRequired", org.hamcrest.Matchers.is(false));
.body("apiKeyRequired", Matchers.is(false));
given()
.contentType(ContentType.JSON)
@@ -255,7 +256,7 @@ class ApiGatewayApiKeyRequiredIntegrationTest {
""")
.when().patch("/restapis/" + apiId + "/resources/" + protectedResourceId + "/methods/GET")
.then().statusCode(200)
.body("apiKeyRequired", org.hamcrest.Matchers.is(true));
.body("apiKeyRequired", Matchers.is(true));
}
@Test @Order(11)
@@ -20,6 +20,7 @@ import io.github.hectorvent.floci.services.ec2.model.Subnet;
import io.github.hectorvent.floci.services.ec2.model.Tag;
import org.junit.jupiter.api.Test;
import org.mockito.ArgumentCaptor;
import org.mockito.Mockito;
import org.mockito.invocation.Invocation;
import org.mockito.stubbing.OngoingStubbing;
@@ -692,11 +693,11 @@ class Ec2NetworkCfnProvisionerTest {
@SuppressWarnings("unchecked")
ArgumentCaptor<List<Tag>> removed = ArgumentCaptor.forClass(List.class);
verify(ec2, org.mockito.Mockito.times(2)).deleteTags(eq(REGION), eq(List.of(RTB_ID)), removed.capture());
verify(ec2, Mockito.times(2)).deleteTags(eq(REGION), eq(List.of(RTB_ID)), removed.capture());
assertEquals(List.of("env=null"), pairs(removed.getAllValues().get(1)), "the key the update added is removed");
@SuppressWarnings("unchecked")
ArgumentCaptor<List<Tag>> written = ArgumentCaptor.forClass(List.class);
verify(ec2, org.mockito.Mockito.times(2)).createTags(eq(REGION), eq(List.of(RTB_ID)), written.capture());
verify(ec2, Mockito.times(2)).createTags(eq(REGION), eq(List.of(RTB_ID)), written.capture());
assertEquals(List.of("Name=old", "team=net"), pairs(written.getAllValues().get(1)), "the prior tags are written back");
assertFalse(r.getAttributes().containsKey(Ec2NetworkCfnProvisioner.IN_PLACE_PRIOR_ATTR));
}
@@ -788,7 +789,7 @@ class Ec2NetworkCfnProvisionerTest {
provisioner.provision(updated, mapper.createObjectNode().put("RouteTableId", RTB_ID)
.put("DestinationCidrBlock", "10.40.0.18/24").put("GatewayId", IGW_ID), ctx(RTB_ID + "|10.40.0.0/24"));
verify(ec2).replaceRoute(REGION, RTB_ID, "10.40.0.18/24", null, null, IGW_ID, null, null);
verify(ec2, org.mockito.Mockito.times(1)).createRoute(any(), any(), any(), any(), any(), any(), any(), any(), any());
verify(ec2, Mockito.times(1)).createRoute(any(), any(), any(), any(), any(), any(), any(), any(), any());
assertEquals(RTB_ID + "|10.40.0.0/24", updated.getPhysicalId());
}
@@ -872,7 +873,7 @@ class Ec2NetworkCfnProvisionerTest {
ReplacementCleanup.mergeDisplaced(previous, r);
assertEquals("subnet-replacement", provisioner.updateCleanupPhysicalId(previous), "the replacement stays owed a delete");
provisioner.completeUpdate(previous);
verify(ec2, org.mockito.Mockito.times(2)).deleteSubnet(REGION, "subnet-replacement");
verify(ec2, Mockito.times(2)).deleteSubnet(REGION, "subnet-replacement");
}
@Test
@@ -930,11 +931,11 @@ class Ec2NetworkCfnProvisionerTest {
assertEquals("TagLimitExceeded", e.getErrorCode());
@SuppressWarnings("unchecked")
ArgumentCaptor<List<Tag>> written = ArgumentCaptor.forClass(List.class);
verify(ec2, org.mockito.Mockito.times(2)).createTags(eq(REGION), eq(List.of(RTB_ID)), written.capture());
verify(ec2, Mockito.times(2)).createTags(eq(REGION), eq(List.of(RTB_ID)), written.capture());
assertEquals(List.of("Name=old", "team=net"), pairs(written.getAllValues().get(1)), "the prior tags are put back");
@SuppressWarnings("unchecked")
ArgumentCaptor<List<Tag>> removed = ArgumentCaptor.forClass(List.class);
verify(ec2, org.mockito.Mockito.times(2)).deleteTags(eq(REGION), eq(List.of(RTB_ID)), removed.capture());
verify(ec2, Mockito.times(2)).deleteTags(eq(REGION), eq(List.of(RTB_ID)), removed.capture());
assertEquals(List.of("env=null"), pairs(removed.getAllValues().get(1)), "the key the failed update added is removed again");
assertFalse(r.getAttributes().containsKey(Ec2NetworkCfnProvisioner.IN_PLACE_PRIOR_ATTR));
assertFalse(r.getAttributes().containsKey(CfnRollback.UPDATE_ROLLBACK_FAILURE_ATTR), "a successful restore reports nothing");
@@ -956,11 +957,11 @@ class Ec2NetworkCfnProvisionerTest {
@SuppressWarnings("unchecked")
ArgumentCaptor<List<Tag>> written = ArgumentCaptor.forClass(List.class);
verify(ec2, org.mockito.Mockito.times(2)).createTags(eq(REGION), eq(List.of(SUBNET_ID)), written.capture());
verify(ec2, Mockito.times(2)).createTags(eq(REGION), eq(List.of(SUBNET_ID)), written.capture());
assertEquals(List.of("Name=old"), pairs(written.getAllValues().get(1)));
// the snapshot recorded the prior value before the flip was attempted, so the restore writes it back
verify(ec2).modifySubnetAttribute(REGION, SUBNET_ID, "mapPublicIpOnLaunch", "false");
verify(ec2, org.mockito.Mockito.times(2)).modifySubnetAttribute(any(), any(), any(), any());
verify(ec2, Mockito.times(2)).modifySubnetAttribute(any(), any(), any(), any());
verify(ec2, never()).deleteSubnet(any(), any());
}
@@ -1002,7 +1003,7 @@ class Ec2NetworkCfnProvisionerTest {
@SuppressWarnings("unchecked")
ArgumentCaptor<List<Tag>> written = ArgumentCaptor.forClass(List.class);
verify(ec2, org.mockito.Mockito.times(2)).createTags(eq(REGION), eq(List.of(NAT_ID)), written.capture());
verify(ec2, Mockito.times(2)).createTags(eq(REGION), eq(List.of(NAT_ID)), written.capture());
assertEquals(List.of("Name=old"), pairs(written.getAllValues().get(1)));
verify(ec2, never()).deleteNatGateway(any(), any());
}
@@ -22,6 +22,7 @@ import io.github.hectorvent.floci.services.cloudfront.model.ResponseHeadersPolic
import io.github.hectorvent.floci.services.cloudfront.model.StreamingDistribution;
import jakarta.ws.rs.core.Response;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.function.Executable;
import org.mockito.Mockito;
import java.security.KeyPairGenerator;
@@ -1740,7 +1741,7 @@ class CloudFrontServiceTest {
}
private static AwsException assertAws(
String code, org.junit.jupiter.api.function.Executable action) {
String code, Executable action) {
AwsException error = assertThrows(AwsException.class, action);
assertEquals(code, error.getErrorCode());
return error;
@@ -39,12 +39,14 @@ import io.github.hectorvent.floci.services.ec2.model.Instance;
import io.github.hectorvent.floci.services.ec2.model.InstanceNetworkInterface;
import io.github.hectorvent.floci.services.ec2.net.VpcNetworkManager;
import io.github.hectorvent.floci.services.ec2.portforward.Ec2PortForwardManager;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.io.TempDir;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.CsvSource;
import org.mockito.ArgumentCaptor;
import java.io.ByteArrayOutputStream;
import java.io.Closeable;
import java.io.InputStream;
import java.nio.charset.StandardCharsets;
@@ -53,6 +55,7 @@ import java.nio.file.Path;
import java.time.Duration;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Base64;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
@@ -71,6 +74,7 @@ import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicReference;
import java.util.function.BooleanSupplier;
import java.util.zip.GZIPOutputStream;
import static org.junit.jupiter.api.Assertions.assertArrayEquals;
import static org.junit.jupiter.api.Assertions.assertEquals;
@@ -141,7 +145,7 @@ class Ec2ContainerManagerTest {
private static final String TEST_LOG_STREAM_NAME = "yyyy/MM/dd/user-data";
private static final String TEST_SSH_PUBLIC_KEY = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAITest test@floci";
@org.junit.jupiter.api.AfterEach
@AfterEach
void resetBridgeIpPolling() {
Ec2ContainerManager.containerBridgeIpAttempts = 30;
Ec2ContainerManager.containerBridgeIpPollMillis = 500;
@@ -716,11 +720,11 @@ class Ec2ContainerManagerTest {
}
private static String gzipBase64(String plain) throws Exception {
java.io.ByteArrayOutputStream bytes = new java.io.ByteArrayOutputStream();
try (java.util.zip.GZIPOutputStream gzip = new java.util.zip.GZIPOutputStream(bytes)) {
ByteArrayOutputStream bytes = new ByteArrayOutputStream();
try (GZIPOutputStream gzip = new GZIPOutputStream(bytes)) {
gzip.write(plain.getBytes(StandardCharsets.UTF_8));
}
return java.util.Base64.getEncoder().encodeToString(bytes.toByteArray());
return Base64.getEncoder().encodeToString(bytes.toByteArray());
}
private static final String CLOUDINIT_MULTIPART = """
@@ -816,7 +820,7 @@ class Ec2ContainerManagerTest {
@Test
void userDataShellScriptsDecodesPlainBase64ShellScript() {
String script = "#!/bin/bash\necho ready\n";
String encoded = java.util.Base64.getEncoder().encodeToString(script.getBytes(StandardCharsets.UTF_8));
String encoded = Base64.getEncoder().encodeToString(script.getBytes(StandardCharsets.UTF_8));
assertEquals(List.of(script), Ec2ContainerManager.userDataShellScripts(encoded));
}
@@ -1128,7 +1132,7 @@ class Ec2ContainerManagerTest {
@Test
void localAwsEnvironmentProvidesCliCredentialsAndFlociEndpoint() {
assertEquals(
java.util.List.of(
List.of(
"AWS_EC2_METADATA_SERVICE_ENDPOINT=http://floci:9169",
"AWS_ENDPOINT_URL=http://floci:4566",
"AWS_DEFAULT_REGION=us-west-2",
@@ -4,6 +4,8 @@ import io.quarkus.test.junit.QuarkusTest;
import io.restassured.path.xml.XmlPath;
import io.restassured.response.ExtractableResponse;
import io.restassured.response.Response;
import io.restassured.specification.RequestSpecification;
import org.hamcrest.MatcherAssert;
import org.junit.jupiter.api.MethodOrderer;
import org.junit.jupiter.api.Order;
import org.junit.jupiter.api.Test;
@@ -4124,7 +4126,7 @@ class Ec2IntegrationTest {
.statusCode(200)
.extract().body().asString();
org.hamcrest.MatcherAssert.assertThat(body, not(containsString("<nextToken>")));
MatcherAssert.assertThat(body, not(containsString("<nextToken>")));
}
// =========================================================================
@@ -4202,14 +4204,14 @@ class Ec2IntegrationTest {
int pageCount = 0;
String nextToken = null;
do {
io.restassured.specification.RequestSpecification req = given()
RequestSpecification req = given()
.formParam("Action", "DescribeNetworkInterfaces")
.formParam("MaxResults", "5")
.header("Authorization", AUTH_HEADER);
if (nextToken != null) {
req = req.formParam("NextToken", nextToken);
}
io.restassured.response.Response resp = req.when().post("/");
Response resp = req.when().post("/");
resp.then().statusCode(200);
pageCount++;
@@ -4221,16 +4223,16 @@ class Ec2IntegrationTest {
// Every page but the last must be a full page of 5.
if (nextToken != null && !nextToken.isEmpty()) {
org.hamcrest.MatcherAssert.assertThat(ids.size(), equalTo(5));
MatcherAssert.assertThat(ids.size(), equalTo(5));
}
} while (nextToken != null && !nextToken.isEmpty());
org.hamcrest.MatcherAssert.assertThat(
MatcherAssert.assertThat(
"Expected " + expectedTotal + " ENIs across " + pageCount + " page(s)",
collected, equalTo(expectedTotal));
// With 5 new ENIs and MaxResults=5, at least one truncated page
// must have occurred (i.e. more than a single page was fetched).
org.hamcrest.MatcherAssert.assertThat(pageCount, greaterThanOrEqualTo(2));
MatcherAssert.assertThat(pageCount, greaterThanOrEqualTo(2));
// ── Cleanup: terminate the 5 extra instances ──
for (String id : batchIds) {
@@ -4254,14 +4256,14 @@ class Ec2IntegrationTest {
int total = 0;
String nextToken = null;
do {
io.restassured.specification.RequestSpecification req = given()
RequestSpecification req = given()
.formParam("Action", "DescribeNetworkInterfaces")
.formParam("MaxResults", "1000")
.header("Authorization", AUTH_HEADER);
if (nextToken != null) {
req = req.formParam("NextToken", nextToken);
}
io.restassured.response.Response resp = req.when().post("/");
Response resp = req.when().post("/");
resp.then().statusCode(200);
List<String> ids = resp.xmlPath().getList(
@@ -93,6 +93,7 @@ import java.time.Duration;
import java.time.Instant;
import java.util.ArrayList;
import java.util.Base64;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedHashMap;
@@ -7537,11 +7538,11 @@ class Ec2ServiceTest {
Ec2Service service = prefixListService();
String[] fixture = attachmentFixture(service);
int threads = 6;
java.util.concurrent.CountDownLatch start = new java.util.concurrent.CountDownLatch(1);
java.util.concurrent.ExecutorService pool =
java.util.concurrent.Executors.newFixedThreadPool(threads);
List<String> created = java.util.Collections.synchronizedList(new java.util.ArrayList<>());
List<String> errors = java.util.Collections.synchronizedList(new java.util.ArrayList<>());
CountDownLatch start = new CountDownLatch(1);
ExecutorService pool =
Executors.newFixedThreadPool(threads);
List<String> created = Collections.synchronizedList(new ArrayList<>());
List<String> errors = Collections.synchronizedList(new ArrayList<>());
for (int i = 0; i < threads; i++) {
pool.submit(() -> {
@@ -7559,7 +7560,7 @@ class Ec2ServiceTest {
}
start.countDown();
pool.shutdown();
assertTrue(pool.awaitTermination(30, java.util.concurrent.TimeUnit.SECONDS));
assertTrue(pool.awaitTermination(30, TimeUnit.SECONDS));
assertEquals(1, created.size(), "trial " + trial + ": exactly one create may win");
assertEquals(threads - 1, errors.size(), "every loser is told the VPC is already attached");
@@ -7581,9 +7582,9 @@ class Ec2ServiceTest {
for (int trial = 0; trial < 10; trial++) {
Ec2Service service = prefixListService();
String[] fixture = attachmentFixture(service);
java.util.concurrent.CountDownLatch start = new java.util.concurrent.CountDownLatch(1);
java.util.concurrent.ExecutorService pool =
java.util.concurrent.Executors.newFixedThreadPool(2);
CountDownLatch start = new CountDownLatch(1);
ExecutorService pool =
Executors.newFixedThreadPool(2);
pool.submit(() -> {
try {
@@ -7609,7 +7610,7 @@ class Ec2ServiceTest {
});
start.countDown();
pool.shutdown();
assertTrue(pool.awaitTermination(30, java.util.concurrent.TimeUnit.SECONDS));
assertTrue(pool.awaitTermination(30, TimeUnit.SECONDS));
List<TransitGatewayVpcAttachment> attachments =
service.describeTransitGatewayVpcAttachments("us-east-1", List.of(), Map.of());
@@ -7646,9 +7647,9 @@ class Ec2ServiceTest {
if (!attachment) {
service.deleteTransitGatewayVpcAttachment("us-east-1", attachmentId);
}
java.util.concurrent.CountDownLatch start = new java.util.concurrent.CountDownLatch(1);
java.util.concurrent.ExecutorService pool =
java.util.concurrent.Executors.newFixedThreadPool(2);
CountDownLatch start = new CountDownLatch(1);
ExecutorService pool =
Executors.newFixedThreadPool(2);
pool.submit(() -> {
try {
@@ -7672,7 +7673,7 @@ class Ec2ServiceTest {
});
start.countDown();
pool.shutdown();
assertTrue(pool.awaitTermination(30, java.util.concurrent.TimeUnit.SECONDS));
assertTrue(pool.awaitTermination(30, TimeUnit.SECONDS));
String what = attachment ? "attachment" : "gateway";
if (attachment) {
@@ -8140,9 +8141,9 @@ class Ec2ServiceTest {
String[] fixture = attachmentFixture(service);
String spare = service.createTransitGatewayRouteTable("us-east-1", fixture[0], List.of())
.getTransitGatewayRouteTableId();
java.util.concurrent.CountDownLatch start = new java.util.concurrent.CountDownLatch(1);
java.util.concurrent.ExecutorService pool =
java.util.concurrent.Executors.newFixedThreadPool(2);
CountDownLatch start = new CountDownLatch(1);
ExecutorService pool =
Executors.newFixedThreadPool(2);
pool.submit(() -> {
try {
@@ -8165,7 +8166,7 @@ class Ec2ServiceTest {
});
start.countDown();
pool.shutdown();
assertTrue(pool.awaitTermination(30, java.util.concurrent.TimeUnit.SECONDS));
assertTrue(pool.awaitTermination(30, TimeUnit.SECONDS));
boolean tableExists = service.describeTransitGatewayRouteTables("us-east-1", List.of(), Map.of())
.stream().anyMatch(rt -> rt.getTransitGatewayRouteTableId().equals(spare));
@@ -8561,7 +8562,7 @@ class Ec2ServiceTest {
return (AccountAwareStorageBackend<V>) override;
}
AccountAwareStorageBackend<V> backend = requestContextInstance != null
? new AccountAwareStorageBackend<>(new io.github.hectorvent.floci.core.storage.InMemoryStorage<>(),
? new AccountAwareStorageBackend<>(new InMemoryStorage<>(),
requestContextInstance, "000000000000")
: AccountAwareStorageBackend.inMemory("000000000000");
created.add(backend);
@@ -8580,7 +8581,7 @@ class Ec2ServiceTest {
private int putCount;
private DetachedImageStorage() {
super(new io.github.hectorvent.floci.core.storage.InMemoryStorage<>(), null, "000000000000");
super(new InMemoryStorage<>(), null, "000000000000");
}
@Override
@@ -8634,8 +8635,8 @@ class Ec2ServiceTest {
copy.setCreationSourceInstanceId(source.getCreationSourceInstanceId());
copy.setDockerImage(source.getDockerImage());
copy.setBlockDeviceMappings(source.getBlockDeviceMappings() == null
? List.of() : new java.util.ArrayList<>(source.getBlockDeviceMappings()));
copy.setTags(source.getTags() == null ? List.of() : new java.util.ArrayList<>(source.getTags()));
? List.of() : new ArrayList<>(source.getBlockDeviceMappings()));
copy.setTags(source.getTags() == null ? List.of() : new ArrayList<>(source.getTags()));
return copy;
}
}
@@ -778,7 +778,7 @@ class FirehoseServiceTest {
private void createSourcedDeliveryStream(String deliveryStream, String sourceStream) {
kinesisService.createStream(sourceStream, 1, "us-east-1");
firehoseService.createDeliveryStream(deliveryStream, destination("arn:aws:s3:::sink", null),
java.util.List.of(), "KinesisStreamAsSource", kinesisSource(sourceStream));
List.of(), "KinesisStreamAsSource", kinesisSource(sourceStream));
}
private void closeSourceParent() {
@@ -897,7 +897,7 @@ class FirehoseServiceTest {
ArgumentCaptor<byte[]> body = ArgumentCaptor.forClass(byte[].class);
verify(s3Service, Mockito.times(2)).putObject(anyString(), anyString(), body.capture(), anyString(),
anyMap(), any(PutObjectOptions.class));
assertEquals(java.util.List.of("first\n", "second\n"),
assertEquals(List.of("first\n", "second\n"),
body.getAllValues().stream().map(b -> new String(b, StandardCharsets.UTF_8)).toList());
}
@@ -910,7 +910,7 @@ class FirehoseServiceTest {
// delivery starts at DeliveryStartTimestamp.
source.setDeliveryStartTimestamp(Instant.now().plusSeconds(3600));
firehoseService.createDeliveryStream("sourced-stream", destination("arn:aws:s3:::sink", null),
java.util.List.of(), "KinesisStreamAsSource", source);
List.of(), "KinesisStreamAsSource", source);
firehoseService.pollKinesisSources();
firehoseService.flush("sourced-stream");
@@ -1138,7 +1138,7 @@ class FirehoseServiceTest {
void aMissingSourceStreamDoesNotStopOtherStreamsFromPolling() {
// No createStream for "gone-stream": describeStream throws ResourceNotFound.
firehoseService.createDeliveryStream("broken-stream", destination("arn:aws:s3:::sink", null),
java.util.List.of(), "KinesisStreamAsSource", kinesisSource("gone-stream"));
List.of(), "KinesisStreamAsSource", kinesisSource("gone-stream"));
createSourcedDeliveryStream("sourced-stream", "src-stream");
kinesisService.putRecord("src-stream", "hello".getBytes(StandardCharsets.UTF_8), "pk", "us-east-1");
@@ -21,6 +21,7 @@ import java.nio.ByteBuffer;
import java.time.Clock;
import java.time.Instant;
import java.time.ZoneOffset;
import java.util.ArrayList;
import java.util.Base64;
import java.util.List;
import java.util.Map;
@@ -1520,7 +1521,7 @@ class KinesisJsonHandlerTest {
assertEquals(3, shards.size());
ObjectNode parent = (ObjectNode) shards.get(0);
List<ObjectNode> children = new java.util.ArrayList<>();
List<ObjectNode> children = new ArrayList<>();
for (JsonNode s : shards) {
if (s.has("ParentShardId") && s.get("ParentShardId").asText().equals(parent.get("ShardId").asText())) {
children.add((ObjectNode) s);