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

Cherry pick net7 #11056

Merged
merged 4 commits into from
Nov 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion eng/pipelines/common/controlgallery-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ steps:
inputs:
provisioning_script: $(provisionator.path)
provisioning_extra_args: $(provisionator.extraArguments)
env:
AUTH_TOKEN_GITHUB_COM: $(github--pat--vs-mobiletools-engineering-service2)

- task: Bash@3
displayName: 'Cake Provision'
Expand Down Expand Up @@ -70,4 +72,4 @@ steps:
condition: always()
inputs:
PathtoPublish: '$(build.artifactstagingdirectory)'
ArtifactName: OSXArtifacts
ArtifactName: OSXArtifacts
4 changes: 4 additions & 0 deletions eng/pipelines/common/controlgallery-ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,17 @@ steps:
condition: ne(variables['REQUIRED_XCODE'], '')
inputs:
provisioning_script: $(provisionator.xcode)
env:
AUTH_TOKEN_GITHUB_COM: $(github--pat--vs-mobiletools-engineering-service2)

- task: xamops.azdevex.provisionator-task.provisionator@1
displayName: 'Provisionator'
condition: eq(variables['provisioning'], 'true')
inputs:
provisioning_script: $(provisionator.path)
provisioning_extra_args: $(provisionator.extraArguments)
env:
AUTH_TOKEN_GITHUB_COM: $(github--pat--vs-mobiletools-engineering-service2)

- script: |
echo "##vso[task.prependpath]/Library/Frameworks/Mono.framework/Versions/Current/Commands/"
Expand Down
2 changes: 2 additions & 0 deletions eng/pipelines/common/controlgallery-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ steps:
inputs:
provisioning_script: $(provisionator.path)
provisioning_extra_args: $(provisionator.extraArguments)
env:
AUTH_TOKEN_GITHUB_COM: $(github--pat--vs-mobiletools-engineering-service2)

- powershell: |
$(System.DefaultWorkingDirectory)/build.ps1 --target provision --TeamProject="$(System.TeamProject)"
Expand Down
2 changes: 1 addition & 1 deletion eng/pipelines/common/provision.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ steps:
provisioning_script: $(provisionator.vs)
env:
PROVISIONATOR_CHANNEL: ${{ parameters.provisionatorChannel }}
AUTH_TOKEN_GITHUB_COM: $(github--pat--vs-mobiletools-engineering-service2)
# Provision Additional Software
- task: xamops.azdevex.provisionator-task.provisionator@1
displayName: 'Provision Additional Software'
Expand All @@ -110,7 +111,6 @@ steps:
env:
PROVISIONATOR_CHANNEL: ${{ parameters.provisionatorChannel }}
AUTH_TOKEN_GITHUB_COM: $(github--pat--vs-mobiletools-engineering-service2)

- pwsh: |
$msbuild = "$env:ProgramFiles/Microsoft Visual Studio/2022/Preview/MSBuild/Current/Bin/MSBuild.exe"
echo "##vso[task.setvariable variable=MSBUILD_EXE]$msbuild"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ int GetPlatformMaxLines(LabelHandler labelHandler) =>

Task ValidateHasColor(Label label, Color color, Action action = null)
{
return InvokeOnMainThreadAsync(() =>
return InvokeOnMainThreadAsync(async () =>
{
var labelHandler = CreateHandler<LabelHandler>(label);
action?.Invoke();
labelHandler.PlatformView.AssertContainsColor(color);
await labelHandler.PlatformView.AssertContainsColor(color);
});
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.2" />
<PackageReference Include="JetBrains.DotMemoryUnit" Version="3.1.20200127.214830" />
<PackageReference Include="NUnit" Version="3.13.3" />
<PackageReference Include="NUnit3TestAdapter" Version="4.2.1" />
<PackageReference Include="Mono.Cecil" Version="0.11.4" />
Expand Down Expand Up @@ -52,4 +51,4 @@

<Import Project="$(MauiSrcDirectory)Maui.InTree.props" Condition=" '$(UseMaui)' != 'true' " />

</Project>
</Project>
17 changes: 14 additions & 3 deletions src/Core/tests/DeviceTests/Services/Dispatching/DispatcherTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -183,21 +183,32 @@ public Task CreateTimerRepeatingRepeats() =>
timer.Interval = TimeSpan.FromMilliseconds(200);
timer.IsRepeating = true;

TaskCompletionSource taskCompletionSource = new TaskCompletionSource();

timer.Tick += (_, _) =>
{
Assert.True(timer.IsRunning, "Timer was not running DURING the tick.");
ticks++;

if (ticks > 1)
taskCompletionSource.SetResult();
};

timer.Start();

Assert.True(timer.IsRunning, "Timer was not running AFTER the tick.");

// Give it time to repeat at least once
await Task.Delay(TimeSpan.FromSeconds(1));
try
{
await taskCompletionSource.Task.WaitAsync(TimeSpan.FromSeconds(5)).ConfigureAwait(false);
}
catch (TaskCanceledException)
{
// If the task is cancelled we want it to just fall through to the assert
}

// If it's repeating, ticks will be greater than 1
Assert.True(ticks > 1);
Assert.True(ticks > 1, $"# of Ticks: {ticks}, expected > 1");
});

class TimerDisposer : IDisposable
Expand Down
2 changes: 1 addition & 1 deletion src/TestUtils/src/DeviceTests.Runners/Assets/credits.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
All rights reserved.<br />
<br />

Author: Oren Novotny<hr />
Author: Claire Novotny<hr />
<br />

<a href="https://xunit.net/">About xUnit</a><br />
Expand Down