Skip to content

Commit

Permalink
DelayedActionRenderer<T> class
Browse files Browse the repository at this point in the history
  • Loading branch information
dahlia committed Sep 4, 2020
1 parent e5b6c4e commit 16faa43
Show file tree
Hide file tree
Showing 8 changed files with 813 additions and 20 deletions.
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,8 @@
"struct",
"unrender",
"unrendered",
"unrenderer",
"unrendering",
"unrenders",
]
}
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ To be released.
- Added `AnonymousRenderer<T>` class. [[#959], [#963]]
- Added `AnonymousActionRenderer<T>` interface. [[#959], [#967], [#970]]
- Added `DelayedRenderer<T>` class. [[#980]]
- Added `DelayedActionRenderer<T>` class. [[#980]]
- Added `LoggedRenderer<T>` class. [[#959], [#963]]
- Added `LoggedActionRenderer<T>` interface. [[#959], [#967], [#970]]
- Added `BlockChain<T>.Renderers` property. [[#945], [#959], [#963]]
Expand Down
379 changes: 379 additions & 0 deletions Libplanet.Tests/Blockchain/Renderers/DelayedActionRendererTest.cs

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions Libplanet.Tests/Blockchain/Renderers/DelayedRendererTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ namespace Libplanet.Tests.Blockchain.Renderers
{
public class DelayedRendererTest
{
private static readonly IReadOnlyList<Block<DumbAction>> _chainA;
private static readonly IReadOnlyList<Block<DumbAction>> _chainB;
private static readonly Block<DumbAction> _branchpoint;
private IStore _store;
private ILogger _logger;
protected static readonly IReadOnlyList<Block<DumbAction>> _chainA;
protected static readonly IReadOnlyList<Block<DumbAction>> _chainB;
protected static readonly Block<DumbAction> _branchpoint;
protected IStore _store;
protected ILogger _logger;

#pragma warning disable S3963
static DelayedRendererTest()
Expand Down Expand Up @@ -48,7 +48,7 @@ public DelayedRendererTest(ITestOutputHelper output)
.Enrich.WithThreadId()
.WriteTo.TestOutput(output)
.CreateLogger()
.ForContext<DelayedRendererTest>();
.ForContext(GetType());
Log.Logger = _logger;
_logger.CompareBothChains(
LogEventLevel.Debug,
Expand All @@ -66,7 +66,7 @@ public DelayedRendererTest(ITestOutputHelper output)
}

[Fact]
public void BlocksBeingAppended()
public virtual void BlocksBeingAppended()
{
var blockLogs = new List<(Block<DumbAction> OldTip, Block<DumbAction> NewTip)>();
uint reorgs = 0;
Expand Down Expand Up @@ -119,7 +119,7 @@ public void BlocksBeingAppended()
}

[Fact]
public void BlocksBeingAppendedInParallel()
public virtual void BlocksBeingAppendedInParallel()
{
var blockLogs = new List<(Block<DumbAction> OldTip, Block<DumbAction> NewTip)>();
var reorgLogs = new List<(
Expand Down
1 change: 1 addition & 0 deletions Libplanet.Tests/Libplanet.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<IsTestProject>true</IsTestProject>
<LangVersion>7.1</LangVersion>
<NoWarn>$(NoWarn);SA1401</NoWarn>
<CodeAnalysisRuleSet>..\Libplanet.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>

Expand Down
3 changes: 3 additions & 0 deletions Libplanet.sln.DotSettings
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,7 @@
<s:Boolean x:Key="/Default/UserDictionary/Words/=struct/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=unrender/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=unrendered/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=unrenderer/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=unrendering/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=unrenders/@EntryIndexedValue">True</s:Boolean>
</wpf:ResourceDictionary>
Loading

0 comments on commit 16faa43

Please sign in to comment.