Skip to content
Open
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
2 changes: 1 addition & 1 deletion scripts/test-utils.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function Parse-TestResults([string] $Path) {
Inconclusive = [int]$testRun.inconclusive
Skipped = [int]$testRun.skipped
Duration = [double]$testRun.duration
Success = $testRun.result -eq "Passed"
Success = [int]$testRun.total -gt 0 -and [int]$testRun.failed -eq 0
FailedTests = @()
}

Expand Down
2 changes: 1 addition & 1 deletion scripts/unity-test-cli.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@ function Invoke-UnityHeadlessTest(
Skipped = $summary.Skipped
Inconclusive = $summary.Inconclusive
FailedTests = $summary.FailedTests
Success = $run.ExitCode -eq 0 -and $summary.Success -and $summary.Inconclusive -eq 0
Success = $run.ExitCode -eq 0 -and $summary.Success
}
}
4 changes: 2 additions & 2 deletions scripts/unity-test-pipeline.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ function Get-TestSummary([string] $requestedMode, [object] $result) {
}
})

$success = $summary.Total -gt 0 -and $summary.Failed -eq 0 -and $summary.Inconclusive -eq 0
$success = $summary.Total -gt 0 -and $summary.Failed -eq 0
[pscustomobject]@{
Mode = $result.Mode
Duration = $result.Duration
Expand Down Expand Up @@ -109,7 +109,7 @@ function Invoke-UnityPipelineTests(
}

if ($testPlatform -eq "playmode") {
$started = Invoke-UnityPipelineCommand -ProjectPath $projectPath -Command "run_tests" -CommandArguments ($commandArguments + @("--async_tests", "true"))
$started = Invoke-UnityPipelineCommand -ProjectPath $projectPath -Command "run_tests" -CommandArguments ($commandArguments + @("--async_tests", "true")) -TimeoutSeconds ($timeoutSeconds + 30)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Timeout was missing.

if (-not $started.success) {
throw "Unity PlayMode tests could not start: $($started.error)"
}
Expand Down
7 changes: 5 additions & 2 deletions src/Sentry.Unity/Integrations/AnrIntegration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,11 @@ internal AnrWatchDogSingleThreaded(IDiagnosticLogger? logger, SentryMonoBehaviou
logger?.LogDebug("Stopping ANR detection coroutine.");
_watch.Stop();

MonoBehaviour.StopCoroutine(_updateUiStatusCoroutine);
_updateUiStatusCoroutine = null;
if (_updateUiStatusCoroutine is not null)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a real but but following the established pattern from below. If triggering the putting-on-background twice this would throw. It's a non-existing issue on actual builds in an already deprecated feature.

{
MonoBehaviour.StopCoroutine(_updateUiStatusCoroutine);
_updateUiStatusCoroutine = null;
}
};
MonoBehaviour.ApplicationResuming += () =>
{
Expand Down
Loading