-
Notifications
You must be signed in to change notification settings - Fork 55
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
Netcore targeted integration tests #752
Merged
tehbio
merged 16 commits into
arm64-feature-branch
from
netcore-targeted-integration-tests
Oct 12, 2021
Merged
Netcore targeted integration tests #752
tehbio
merged 16 commits into
arm64-feature-branch
from
netcore-targeted-integration-tests
Oct 12, 2021
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Updates MongDb driver to v2.13.1. Adds CoreIndexManger related tests to test against a net core test application. Refactors tests. * fixes failed test endpoints due to incorrectly exercises mongodb apis. * Expands AsyncCursorsTests tests to NetCore test application. * Expands IndexManagerTests tests to the netcore mongodb test application. * Expands the rest of MongoDb tests to test against .net core test application. * removes irrelevant ref.
…elic/newrelic-dotnet-agent into netcore-targeted-integration-tests
tehbio
approved these changes
Oct 12, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Validated these changes in our CI here: https://github.com/tehbio/newrelic-dotnet-agent/actions/runs/1335050374
This was referenced Oct 14, 2021
tehbio
added a commit
that referenced
this pull request
Oct 26, 2021
* A workflow to build linux arm64 profiler (#742) * Adds new profiler build job for arm64 Updates existing linuc job name to callout out arch Updates conditionals to match new job names Updates _profilerBuild deletion list to include new paths * Updates build_functions.ps1 to support new folder names * Removed -march from CMAKELIST * Move to https and no caching for wget (#744) * Netcore targeted integration tests (#752) * Builds but some int tests fail locally; want to test in GHA * Multi-targeted integration test project * Conditional inclusion of WCF project * Various Linux compatibility fixes, WIP * Linux debugging, WIP, will not work on Windows * Dynamic detection of Windows vs. Linux * Added commands to remove expired cert. (#748) * More windows/linux differences * Make IsLinux a property * Update mongodb tests (#747) * Updates MongDb driver to v2.13.1. Adds CoreIndexManger related tests to test against a net core test application. Refactors tests. * fixes failed test endpoints due to incorrectly exercises mongodb apis. * Expands AsyncCursorsTests tests to NetCore test application. * Expands IndexManagerTests tests to the netcore mongodb test application. * Expands the rest of MongoDb tests to test against .net core test application. * removes irrelevant ref. * Remove RIDs from test app project files; handle Process.HasExited exception * Attempt to solve .exe issue Co-authored-by: Basil <tehbio@gmail.com> Co-authored-by: Vu Tran <56414817+vuqtran88@users.noreply.github.com> * Updates to produce Linux ARM64 artifacts (#745) * ArtifactBuilder updates for new linux artifacts. * Script + workflow updates for Linux ARM64 artifacts. * Fixed Artifact default value. * Fix for expired CA. * Added commands to remove expired cert. (#748) * Updated to handle multiple file checksums. * Added Processor Architecture to Environment payload. (#755) * Arm64 publishing for debian (#756) * renaming deploy.yml to deploy_agent.yml to better call out its function * Updates repoman-promote.bash for arm64 * Updates deploy-packages.bash for arm64 * Updates debain conf files for arm64 * Undo deploy rename * Use named pipes for test app ipc (#762) * Using named pipes for test application process control * Get test using AspNetCoreMvcBasicRequestsApplication to pass on Windows * Refactor test app lifecycle management into helper library * Refactor lifecycle management for AspNetCore3BasicWebApiApp * Refactored several apps to use shared lifecycle management code * oops, missed a spot * Refactor SerilogSumologic app * Move net core attribute instrumentation tests to use ConsoleMF app * Remove NetCoreAttributeInstrumentationFixture * Unify framework and core attribute instrumentation tests * Arm64 testing fixes. * Arm64 testing fixes continued. * Updates broken local build to match GHA (#764) Removes old linux-release folder Adds linux-arm64-release with the .so from the old folder Adds linux-arm64-release with the so from https://github.com/newrelic/newrelic-dotnet-agent/actions/runs/1356682557 Updates profiler build.ps1 with the new-correct path (this is only used locally) * Fix linux integration test failures (#766) * Using named pipes for test application process control * Get test using AspNetCoreMvcBasicRequestsApplication to pass on Windows * Refactor test app lifecycle management into helper library * Refactor lifecycle management for AspNetCore3BasicWebApiApp * Refactored several apps to use shared lifecycle management code * oops, missed a spot * Refactor SerilogSumologic app * Move net core attribute instrumentation tests to use ConsoleMF app * Remove NetCoreAttributeInstrumentationFixture * Unify framework and core attribute instrumentation tests * Attempt to fix Linux issues with EnvironmentTests * Add comment about nullable total ram field * Update Rejit tests to use Path.Combine instead of explicit backslash * Use Path.Combine in InterfaceDefaultsInstrumentationTests * Use Path.Combine in DetachWrapperTests * Use Path.Combine in AspNetCoreMvcAsyncTests * Path.Combine ALL THE THINGS * Somehow AspNet5BasicWebApiApplication wasn't in the solution so it was missed when making all the named pipe changes * Fix framework/core inconsistency in headers tests * Update test app for netcore thread profiling tests to .NET 5 to support Linux testing * Add a method to skip tests on Linux and apply them to the logging tests * Fix test class cleanup error for skipped test * Added GHA step to run integration tests on linux-arm64 (#767) * Added commands to remove expired cert. (#748) * Update mongodb tests (#747) * Updates MongDb driver to v2.13.1. Adds CoreIndexManger related tests to test against a net core test application. Refactors tests. * fixes failed test endpoints due to incorrectly exercises mongodb apis. * Expands AsyncCursorsTests tests to NetCore test application. * Expands IndexManagerTests tests to the netcore mongodb test application. * Expands the rest of MongoDb tests to test against .net core test application. * removes irrelevant ref. * Fix agent hang on startup. (#753) * Adds "System.Net.HttpWebRequest.GetResponse" to the DeferInitializationOnTheseMethods list. Removes confusing/incorrect logging message. * Update CHANGELOG.md * fixes grammar. * Re-enable unbounded tests in workflow (#765) * Added GHA step to run integration tests on linux-arm64. * Updated CHANGELOG.md Co-authored-by: Vu Tran <56414817+vuqtran88@users.noreply.github.com> Co-authored-by: Alex Hemsath <57361211+nr-ahemsath@users.noreply.github.com> * CHANGELOG.md update. Co-authored-by: Jacob Affinito <jaffinito@newrelic.com> Co-authored-by: Alex Hemsath <57361211+nr-ahemsath@users.noreply.github.com> Co-authored-by: Vu Tran <56414817+vuqtran88@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
testing
Improvements or fixes to testing frameworks and/or tests without associated agent code changes
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR lays the foundations for being able to run agent integration tests on Linux. Summary of changes:
netcoreapp3.1
in addition tonet461
, along with necessary targeting changes to dependencies. Note that this only affects the target runtime of the test harness code itself. The test applications and the version of the agent that the test harness configures to profile them remain either Framework or Core as they were before.[NetFrameworkTest]
or[NetCoreTest]
attribute - this sets the XUnit test "trait"FrameworkVersion
appropriately so we can filter only the .NET Core tests (i.e. tests that use a .NET Core test app and the core agent to instrument it) when running on Linux/tmp
instead ofC:\
)linux-x64
orwin-x64
as appropriate).exe
extension on LinuxProcess.HasExited
on Linux(I have merged in changes from
main
as well as from the feature branch, so this PR also includes some unrelated changes, mostly related to MongoDB testing.)Note that the majority of the integration tests still will not pass on Linux because of the use of named EventWaitHandles (unsupported on Linux) for inter-process synchronization. The tests which use the
ConsoleMultiFunctionAppCore
as the test app should pass. The test namedNewRelic.Agent.IntegrationTests.Api.ApiCallsTestsCore.ExpectedMetrics
definitely passes. The reason for doing this PR into the ARM64 feature branch is to allow other team members to start working on adding limited Linux integration testing to our GHA workflow.You can run an individual test (by name) on Linux by running this command (from the folder
tests/Agent/IntegrationTests/IntegrationTests
:dotnet test --verbosity detailed --framework netcoreapp3.1 --filter FullyQualifiedName=NewRelic.Agent.IntegrationTests.Api.ApiCallsTestsCore.ExpectedMetrics
Author Checklist
All N/A
Reviewer Checklist