T&est stability improvement, adjusted Choco verification description

This commit is contained in:
Christian Köllner 2019-08-27 19:07:53 +02:00
parent 7c5264ea26
commit c46ca4876c
2 changed files with 13 additions and 19 deletions

View File

@ -510,6 +510,8 @@ namespace Capnp.Net.Runtime.Tests.GenImpls
#region TestCallOrder #region TestCallOrder
class TestCallOrderImpl : ITestCallOrder class TestCallOrderImpl : ITestCallOrder
{ {
readonly object _lock = new object();
ILogger Logger { get; } = Logging.CreateLogger<TestCallOrderImpl>(); ILogger Logger { get; } = Logging.CreateLogger<TestCallOrderImpl>();
public uint Count { get; set; } public uint Count { get; set; }
@ -518,12 +520,18 @@ namespace Capnp.Net.Runtime.Tests.GenImpls
public void Dispose() public void Dispose()
{ {
Assert.IsTrue(!CountToDispose.HasValue || Count == CountToDispose, "Must not dispose at this point"); lock (_lock)
{
Assert.IsTrue(!CountToDispose.HasValue || Count == CountToDispose, "Must not dispose at this point");
}
} }
public Task<uint> GetCallSequence(uint expected, CancellationToken cancellationToken_) public Task<uint> GetCallSequence(uint expected, CancellationToken cancellationToken_)
{ {
return Task.FromResult(Count++); lock (_lock)
{
return Task.FromResult(Count++);
}
} }
} }
#endregion TestCallOrder #endregion TestCallOrder

View File

@ -2,20 +2,6 @@ VERIFICATION
Verification is intended to assist the Chocolatey moderators and community Verification is intended to assist the Chocolatey moderators and community
in verifying that this package's contents are trustworthy. in verifying that this package's contents are trustworthy.
This package is published by the capnproto-dotnetcore project itself. This package is published by the capnproto-dotnetcore project itself. It must be identical to the
Starting from a plain Chocolatey test environment, please follow these steps: package which is published on GitHub (replace $version$ by the appropriate version tag):
https://github.com/c80k/capnproto-dotnetcore/releases/tag/v$version$
Install .NET Core SDK 2.2.401:
> choco install dotnetcore-sdk --version 2.2.401
Reboot if necessary:
> shutdown /r
Clone the master branch from GitHub:
> git clone git://github.com/c80k/capnproto-dotnetcore.git
> cd capnproto-dotnetcore\scripts
Run the packaging script:
> .\capnpc-csharp-pack.ps1
Verify the generated NuGet packages inside capnproto-dotnetcore\chocolatey\install