1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-05 04:52:53 +08:00
osu-lazer/osu.Game.Tests
Bartłomiej Dach 15fb1a099e Modify assert to avoid false failures
In headless tests it was possible for TestInstantLoad() to erroneously
fail. There were two scenarios in which LoadingSpinner could be null:

1. If the test runner was quick enough, the assert could end up running
   even before Loader.OnEntering() had even had a chance to, meaning
   that the spinner was never even actually assigned to or instantiated
   at that point in time.

2. Even if Loader.OnEntering() had managed to run, there was also
   a possibility that the spinner itself wasn't loaded at the point
   of checking the assertion. As the spinner is accessed through
   ChildrenOfType(), which only checks InternalChildren and ignores
   all currently-loading drawables, it would therefore return null.

As null != 0, both of these cases would actually fail the test (this is
best seen running headless, preferably with a [Repeat] attribute
attached).

To resolve, allow the spinner to be null at the point of asserting and
duplicate the assertion step at the end. This weakens the test, as case
(1) should probably be waited for and case (2) could be solved with
exposition as protected in the base, but when attempting to wait for
the loader itself to be loaded there were also cases where the
appropriate until step would take so much time that the spinner would
actually become visible in line with the delayed display logic, so this
is a best-effort attempt to address both points without radical
changes.
2020-03-28 00:43:57 +01:00
..
Beatmaps Merge branch 'master' into video-offset 2020-03-25 11:28:59 +09:00
Chat Change containment check to overlap 2019-10-25 00:42:58 +02:00
Editor Remove beat divisor from ctor and use DI instead 2020-02-05 17:48:21 +09:00
Gameplay Merge branch 'basic-replay-recorder' into replay-recording 2020-03-24 16:31:14 +09:00
NonVisual Merge branch 'master' into fix-effect-points 2019-12-18 01:43:15 +09:00
Online Resolve unassigned properties 2020-01-17 18:52:13 +09:00
Resources Add test for loading storyboards with missing video file. 2020-03-27 12:07:47 +01:00
Scores/IO Remove unused GetUnderlyingStream method 2020-03-24 14:08:25 +09:00
ScrollAlgorithms Fix lifetime calculation in overlapping algorithm 2020-02-06 23:13:28 +01:00
Skins Fix ogg beatmap/skin samples not loading 2020-02-18 13:21:55 +09:00
Visual Modify assert to avoid false failures 2020-03-28 00:43:57 +01:00
osu.Game.Tests.csproj Bump Microsoft.NET.Test.Sdk from 16.4.0 to 16.5.0 2020-02-10 08:24:12 +00:00
WaveformTestBeatmap.cs Render video as a part of the storyboard 2020-03-07 21:32:03 -08:00