Skip to content

Commit 7c60491

Browse files
Fix NPE in logic that parses flaky tests list
1 parent b278d9e commit 7c60491

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

dd-java-agent/agent-ci-visibility/src/main/java/datadog/trace/civisibility/config/ConfigurationApiImpl.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,12 +211,14 @@ public Map<String, Collection<TestIdentifier>> getFlakyTestsByModule(
211211

212212
LOGGER.debug("Received {} flaky tests in total", response.size());
213213

214+
Configurations requestConf = tracerEnvironment.getConfigurations();
215+
214216
int flakyTestsCount = 0;
215217
Map<String, Collection<TestIdentifier>> testIdentifiers = new HashMap<>();
216218
for (DataDto<TestIdentifierJson> dataDto : response) {
217219
TestIdentifierJson testIdentifierJson = dataDto.getAttributes();
218-
Configurations configurations = testIdentifierJson.getConfigurations();
219-
String moduleName = configurations.getTestBundle();
220+
Configurations conf = testIdentifierJson.getConfigurations();
221+
String moduleName = (conf != null ? conf : requestConf).getTestBundle();
220222
testIdentifiers
221223
.computeIfAbsent(moduleName, k -> new HashSet<>())
222224
.add(testIdentifierJson.toTestIdentifier());

0 commit comments

Comments
 (0)