Skip to content

Commit

Permalink
spotless
Browse files Browse the repository at this point in the history
Signed-off-by: Sandesh Kumar <[email protected]>
  • Loading branch information
sandeshkr419 committed Oct 21, 2024
1 parent baecc1c commit 949f95d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,6 @@ private void assertStarTreeContext(
SearchContext context = searchService.createContext(reader, request, null, true);
StarTreeQueryContext actualContext = context.getStarTreeQueryContext();



if (expectedContext == null) {
assertThat(context.getStarTreeQueryContext(), nullValue());
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,10 @@

import org.apache.lucene.index.LeafReaderContext;
import org.apache.lucene.util.FixedBitSet;
import org.junit.Before;
import org.junit.Test;
import org.opensearch.index.codec.composite.CompositeIndexFieldInfo;
import org.opensearch.search.startree.StarTreeQueryContext;
import org.opensearch.test.OpenSearchTestCase;
import org.junit.Before;

import java.util.HashMap;
import java.util.Map;
Expand Down Expand Up @@ -47,7 +46,6 @@ public void setUp() {
when(mockLeafReaderContext.ord).thenReturn(1);
}


public void testConstructorWithValidNumSegmentsCache() {
// Initialize context with valid numSegmentsCache
int numSegmentsCache = 3;
Expand All @@ -62,7 +60,6 @@ public void testConstructorWithValidNumSegmentsCache() {
assertEquals(numSegmentsCache, context.getStarTreeValues().length);
}


public void testConstructorWithNegativeNumSegmentsCache() {
// Initialize context with invalid numSegmentsCache (-1)
context = new StarTreeQueryContext(mockStarTree, queryMap, -1);
Expand All @@ -71,7 +68,6 @@ public void testConstructorWithNegativeNumSegmentsCache() {
assertNull(context.getStarTreeValues());
}


public void testGetStarTreeValues_WithValidContext() {
// Initialize context with a cache of size 3
context = new StarTreeQueryContext(mockStarTree, queryMap, 3);
Expand All @@ -88,7 +84,6 @@ public void testGetStarTreeValues_WithValidContext() {
assertEquals(fixedBitSet, result);
}


public void testGetStarTreeValues_WithNullCache() {
// Initialize context with no cache (numSegmentsCache is -1)
context = new StarTreeQueryContext(mockStarTree, queryMap, -1);
Expand All @@ -99,7 +94,7 @@ public void testGetStarTreeValues_WithNullCache() {
// Verify that the result is null since there's no cache
assertNull(result);
}

public void testSetStarTreeValues() {
// Initialize context with a cache of size 3
context = new StarTreeQueryContext(mockStarTree, queryMap, 3);
Expand Down

0 comments on commit 949f95d

Please sign in to comment.