mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 13:15:08 +08:00
Fix occasionally ChatOverlay
test failures due to RNG usage
See https://github.com/ppy/osu/actions/runs/10302758137/job/28517150950. Same ID gets chosen twice for PM channel.
This commit is contained in:
parent
45c1dfde5e
commit
0a8e342830
@ -717,9 +717,12 @@ namespace osu.Game.Tests.Visual.Online
|
||||
Type = ChannelType.Public,
|
||||
};
|
||||
|
||||
private static int privateChannelUser = DummyAPIAccess.DUMMY_USER_ID + 1;
|
||||
|
||||
private Channel createPrivateChannel()
|
||||
{
|
||||
int id = RNG.Next(0, DummyAPIAccess.DUMMY_USER_ID - 1);
|
||||
int id = Interlocked.Increment(ref privateChannelUser);
|
||||
|
||||
return new Channel(new APIUser
|
||||
{
|
||||
Id = id,
|
||||
|
Loading…
Reference in New Issue
Block a user