Skip to content

Commit 5cde176

Browse files
akolarkunnuakolarkunnu
and
akolarkunnu
authored
org.opensearch.repositories.s3.S3BlobStoreRepositoryTests.testRequestStats fails with NullPointerException (#13814)
It's a NullPointerException from S3BlobStore.extendedStats() method, where 'genericStatsMetricPublisher' is null. This parameter sets through S3Repository constructor from test and in this test it sets as null. This is the root cause of the issue. If we set valid a GenericStatsMetricPublisher, test works fine without any issue. This was a consistent failure, not a random failure. Resolves #10735 Signed-off-by: akolarkunnu <abdul.kolarkunnu@netapp.com> Co-authored-by: akolarkunnu <abdul.kolarkunnu@netapp.com>
1 parent 56d8dc6 commit 5cde176

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

plugins/repository-s3/src/internalClusterTest/java/org/opensearch/repositories/s3/S3BlobStoreRepositoryTests.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,6 @@ protected Settings nodeSettings(int nodeOrdinal) {
165165
return builder.build();
166166
}
167167

168-
@AwaitsFix(bugUrl = "https://github.com/opensearch-project/OpenSearch/issues/10735")
169168
@Override
170169
public void testRequestStats() throws Exception {
171170
final String repository = createRepository(randomName());
@@ -249,6 +248,8 @@ protected S3Repository createRepository(
249248
ClusterService clusterService,
250249
RecoverySettings recoverySettings
251250
) {
251+
GenericStatsMetricPublisher genericStatsMetricPublisher = new GenericStatsMetricPublisher(10000L, 10, 10000L, 10);
252+
252253
return new S3Repository(
253254
metadata,
254255
registry,
@@ -263,7 +264,7 @@ protected S3Repository createRepository(
263264
false,
264265
null,
265266
null,
266-
null
267+
genericStatsMetricPublisher
267268
) {
268269

269270
@Override

0 commit comments

Comments
 (0)