Skip to content

Commit

Permalink
fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sahusanket committed Jul 17, 2024
1 parent cdcdb93 commit d58a081
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions cdap-master/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,12 @@
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
<dependency>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
<version>4.0.3</version>
<scope>test</scope>
</dependency>
</dependencies>

<profiles>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public void testPublishFlow() throws Exception {

// Ensure if one writer throws exception on write(), rest still get metrics
MetricsWriter faultyWriter = writers.get(getWriterName(2));
doThrow(IOException.class).when(faultyWriter).write(metricValues);
doThrow(RuntimeException.class).when(faultyWriter).write(metricValues);
publisher.publish(metricValues);
for (Map.Entry<String, MetricsWriter> entry : writers.entrySet()) {
MetricsWriter writer = entry.getValue();
Expand Down

0 comments on commit d58a081

Please sign in to comment.