Changed names of unit tests to reflect new behavior

This commit is contained in:
Zach Humpherys 2024-02-21 11:05:16 -08:00
parent d479d79925
commit 317edd71d3

View file

@ -378,14 +378,14 @@ public class PrefetchRecordsPublisherTest {
} }
@Test(expected = IllegalStateException.class) @Test(expected = IllegalStateException.class)
public void testGetNextRecordsWithoutStarting() { public void testSubscribeWithoutStarting() {
verify(executorService, never()).execute(any()); verify(executorService, never()).execute(any());
Subscriber<RecordsRetrieved> mockSubscriber = mock(Subscriber.class); Subscriber<RecordsRetrieved> mockSubscriber = mock(Subscriber.class);
getRecordsCache.subscribe(mockSubscriber); getRecordsCache.subscribe(mockSubscriber);
} }
@Test(expected = IllegalStateException.class) @Test(expected = IllegalStateException.class)
public void testCallAfterShutdown() { public void testRequestRecordsOnSubscriptionAfterShutdown() {
GetRecordsResponse response = GetRecordsResponse.builder().records( GetRecordsResponse response = GetRecordsResponse.builder().records(
Record.builder().data(SdkBytes.fromByteArray(new byte[] { 1, 2, 3 })).sequenceNumber("123").build()) Record.builder().data(SdkBytes.fromByteArray(new byte[] { 1, 2, 3 })).sequenceNumber("123").build())
.nextShardIterator(NEXT_SHARD_ITERATOR).build(); .nextShardIterator(NEXT_SHARD_ITERATOR).build();