-
Bug
-
Resolution: Won't Fix
-
Minor
-
None
In dotnet application coverage plugin is giving the below error in jenkins.
xml file
<DataCollectors>5 <DataCollector friendlyName="XPlat code coverage">6 <Configuration>7 <Format>cobertura,opencover</Format>8 <ExcludeByFile>*/Migrations/,**/Program.cs</ExcludeByFile>9 </Configuration>10 </DataCollector>
error log
org.jenkinsci.plugins.workflow.actions.ErrorAction$ErrorId: 061a4f6e-7039-46e2-9171-f9bb233f00ec*14:12:31* java.lang.IllegalArgumentException: There is already a child [METHOD] SendNotificationsToSubscribedStaffAsync() <0> with the name SendNotificationsToSubscribedStaffAsync() in [CLASS] Ilid.EventService.Application.Services.NotificationService <3, LINE: 100.00% (23/23)>14:12:31 at edu.hm.hafner.coverage.Node.addChild(Node.java:167)14:12:31 at edu.hm.hafner.coverage.ClassNode.createMethodNode(ClassNode.java:74)14:12:31 at edu.hm.hafner.coverage.parser.CoberturaParser.createMethodNode(CoberturaParser.java:234)14:12:31 at edu.hm.hafner.coverage.parser.CoberturaParser.createNode(CoberturaParser.java:221)14:12:31 at edu.hm.hafner.coverage.parser.CoberturaParser.readClassOrMethod(CoberturaParser.java:164)14:12:31 at edu.hm.hafner.coverage.parser.CoberturaParser.readClassOrMethod(CoberturaParser.java:195)14:12:31 at edu.hm.hafner.coverage.parser.CoberturaParser.readPackage(CoberturaParser.java:133)14:12:31 at edu.hm.hafner.coverage.parser.CoberturaParser.readModule(CoberturaParser.java:112)14:12:31 at edu.hm.hafner.coverage.parser.CoberturaParser.parseReport(CoberturaParser.java:90)14:12:31 at edu.hm.hafner.coverage.CoverageParser.parse(CoverageParser.java:80)14:12:31 at io.jenkins.plugins.coverage.metrics.steps.CoverageReportScanner.processFile(CoverageReportScanner.java:60)14:12:31 at io.jenkins.plugins.util.AgentFileVisitor.scanFiles(AgentFileVisitor.java:114)14:12:31 at io.jenkins.plugins.util.AgentFileVisitor.invoke(AgentFileVisitor.java:93)14:12:31 at io.jenkins.plugins.util.AgentFileVisitor.invoke(AgentFileVisitor.java:39)14:12:31 at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3616)14:12:31 at hudson.remoting.UserRequest.perform(UserRequest.java:211)14:12:31 at hudson.remoting.UserRequest.perform(UserRequest.java:54)14:12:31 at hudson.remoting.Request$2.run(Request.java:377)14:12:31 at hudson.remoting.InterceptingExecutorService.lambda$wrap$0(InterceptingExecutorService.java:78)14:12:31 at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)14:12:31 at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)14:12:31 at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)14:12:31 at hudson.remoting.Engine$1.lambda$newThread$0(Engine.java:137)14:12:31 at java.base/java.lang.Thread.run(Thread.java:840)
Failing in code
public async Task SendNotificationsToSubscribedStaffAsync(string title, string message, List<int> staffIds, NotificationType notificationType, int? eventId = default)
{
await SendNotificationsToSubscribedStaffAsync(title, message, message, staffIds, notificationType, eventId);
}
public async Task SendNotificationsToSubscribedStaffAsync(string title, string emailMessage, string notificationMessage, List<int> staffIds, NotificationType notificationType, int? eventId = null)
{
var subscribedStaff = await GetSubscribedStaffByNotificationTypeAsync(staffIds, notificationType.Id);