Skip to content

Commit

Permalink
fix(playwrighttesting): logger name and flaky tests (#46746)
Browse files Browse the repository at this point in the history
* fix(): logger name and flaky tests

* fix(): run name fetching logic name from git

---------

Co-authored-by: Siddharth Singha Roy <ssingharoy@microsoft.com>
  • Loading branch information
Sid200026 and Siddharth Singha Roy authored Oct 22, 2024
1 parent fe44601 commit 8981012
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,15 @@ This guide explains the different options available to you in the Azure.Develope
<!-- The below parameters are optional -->
<Parameter name="Os" value="linux" />
<Parameter name="RunId" value="sample-run-id" />
<Parameter name="ExposeNetwork" value="<loopback>" />
<Parameter name="ServiceAuthType" value="EntraId" />
<Parameter name="UseCloudHostedBrowsers" value="true" />
<Parameter name="AzureTokenCredentialType" value="DefaultAzureCredential" />
<Parameter name="ManagedIdentityClientId" value="77bfc267-86cb-4eeb-9e4a-747a217a318c" />
<Parameter name="EnableGitHubSummary" value="false" />
</TestRunParameters>
<!-- Enable Reporting feature -->
<LoggerRunSettings>
<Loggers>
<Logger friendlyName="ms-playwright-service" enabled="true" />
<Logger friendlyName="microsoft-playwright-testing" enabled="true" />
</Loggers>
</LoggerRunSettings>
</RunSettings>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ internal static string GetRunName(CIInfo ciInfo)
{
string GIT_VERSION_COMMAND = "git --version";
string GIT_REV_PARSE = "git rev-parse --is-inside-work-tree";
string GIT_COMMIT_MESSAGE_COMMAND = "git log -1 --pretty=%B";
string GIT_COMMIT_MESSAGE_COMMAND = "git log -1 --pretty=format:\"%s\"";

if (ciInfo.Provider == CIConstants.s_gITHUB_ACTIONS &&
Environment.GetEnvironmentVariable("GITHUB_EVENT_NAME") == "pull_request")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Tests.Utility
{
[TestFixture]
[Parallelizable(ParallelScope.Self)]
public class CiInfoProviderTests
{
private Dictionary<string, string> _originalEnvironmentVariables = new();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
namespace Azure.Developer.MicrosoftPlaywrightTesting.TestLogger.Tests.Utility;

[TestFixture]
[Parallelizable(ParallelScope.Self)]
public class ReporterUtilsTests
{
private static string GetToken(Dictionary<string, object> claims, DateTime? expires = null)
Expand Down

0 comments on commit 8981012

Please sign in to comment.