Skip to content

Commit ab49942

Browse files
SpotlessCheck
Signed-off-by: Aparajita Pandey <[email protected]>
1 parent bceaa61 commit ab49942

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

modules/transport-grpc/spi/src/test/java/org/opensearch/transport/grpc/spi/GrpcInterceptorProviderTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public List<GrpcInterceptorProvider.OrderedGrpcInterceptor> getOrderedGrpcInterc
4949
public void testProviderReceivesThreadContext() {
5050
ThreadContext threadContext = new ThreadContext(Settings.EMPTY);
5151
threadContext.putHeader("X-Test-Header", "test-value");
52-
52+
5353
GrpcInterceptorProvider provider = new GrpcInterceptorProvider() {
5454
@Override
5555
public List<GrpcInterceptorProvider.OrderedGrpcInterceptor> getOrderedGrpcInterceptors(ThreadContext ctx) {

modules/transport-grpc/src/test/java/org/opensearch/transport/grpc/GrpcPluginTests.java

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -836,14 +836,12 @@ public void testGrpcInterceptorChainIntegrationWithPlugin() {
836836

837837
// Should not throw exception and should load providers
838838
assertDoesNotThrow(() -> plugin.loadExtensions(mockLoader));
839-
839+
840840
// Need to call createComponents to actually initialize the chain
841841
ThreadPool mockThreadPool = Mockito.mock(ThreadPool.class);
842842
when(mockThreadPool.getThreadContext()).thenReturn(new org.opensearch.common.util.concurrent.ThreadContext(Settings.EMPTY));
843-
844-
assertDoesNotThrow(() -> plugin.createComponents(
845-
client, null, mockThreadPool, null, null, null, null, null, null, null, null
846-
));
843+
844+
assertDoesNotThrow(() -> plugin.createComponents(client, null, mockThreadPool, null, null, null, null, null, null, null, null));
847845
}
848846

849847
public void testGrpcInterceptorChainWithDuplicateOrders() {
@@ -863,15 +861,16 @@ public void testGrpcInterceptorChainWithDuplicateOrders() {
863861

864862
// Load extensions first
865863
plugin.loadExtensions(mockLoader);
866-
864+
867865
// Mock ThreadPool for createComponents
868866
ThreadPool mockThreadPool = Mockito.mock(ThreadPool.class);
869867
when(mockThreadPool.getThreadContext()).thenReturn(new org.opensearch.common.util.concurrent.ThreadContext(Settings.EMPTY));
870868

871869
// Should throw exception due to duplicate orders during createComponents
872-
expectThrows(IllegalArgumentException.class, () -> plugin.createComponents(
873-
client, null, mockThreadPool, null, null, null, null, null, null, null, null
874-
));
870+
expectThrows(
871+
IllegalArgumentException.class,
872+
() -> plugin.createComponents(client, null, mockThreadPool, null, null, null, null, null, null, null, null)
873+
);
875874
}
876875

877876
/**

0 commit comments

Comments
 (0)