Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Null ref in event log data collector for seemingly unsupported event logs #1895

Closed
kaadhina opened this issue Jan 22, 2019 · 0 comments
Closed
Assignees
Labels

Comments

@kaadhina
Copy link
Contributor

kaadhina commented Jan 22, 2019

https://github.com/Microsoft/vstest/blob/7b6248203164f8ea821f6795632bd22e0b69afb0/src/DataCollectors/Microsoft.TestPlatform.Extensions.EventLogCollector/EventLogDataCollector.cs#L577

<DataCollectors> <DataCollector uri="datacollector://microsoft/EventLog/2.0" assemblyQualifiedName="Microsoft.TestPlatform.Extensions.EventLogCollector.EventLogDataCollector, Microsoft.TestPlatform.Extensions.EventLogCollector, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" friendlyName="Event Log"> <Configuration> <Setting name="EventLogs" value="Application,System,E2EFactory" /> </Configuration> </DataCollector>

Log error throws a null ref with an irrelevant message:

Data collector 'Event Log' message: Data collector 'Event Log' threw an exception during type loading, construction, or initialization: System.ArgumentNullException: Value cannot be null.
Parameter name: context
at Microsoft.VisualStudio.TestPlatform.ObjectModel.ValidateArg.NotNull[T](T arg, String parameterName)
at Microsoft.VisualStudio.TestPlatform.Common.DataCollector.TestPlatformDataCollectionLogger.LogError(DataCollectionContext context, String text, Exception exception)
at Microsoft.TestPlatform.Extensions.EventLogCollector.EventLogDataCollector.ConfigureEventLogNames(CollectorNameValueConfigurationManager collectorNameValueConfigurationManager)
at Microsoft.TestPlatform.Extensions.EventLogCollector.EventLogDataCollector.Initialize(XmlElement configurationElement, DataCollectionEvents events, DataCollectionSink dataSink, DataCollectionLogger logger, DataCollectionEnvironmentContext dataCollectionEnvironmentContext)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants