Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use in-memory LiteDBStore in tests #521

Merged
merged 2 commits into from Sep 20, 2019

Conversation

@earlbread
Copy link
Member

commented Sep 19, 2019

This improves the test speed by using in-memory LiteDBStore in tests and restores test timeout to 10 minutes.

@earlbread earlbread requested review from dahlia, longfin, limebell and moreal Sep 19, 2019
@earlbread earlbread self-assigned this Sep 19, 2019
Libplanet/Store/LiteDBStore.cs Outdated Show resolved Hide resolved
@earlbread earlbread force-pushed the earlbread:litedb-memory branch from 802d6ec to a91f708 Sep 19, 2019
@earlbread

This comment has been minimized.

Copy link
Member Author

commented Sep 19, 2019

I added the code to dispose MemoryStream and changed to create the database if the path parameter is null.

@earlbread earlbread requested review from dahlia, longfin and limebell Sep 19, 2019
@codecov

This comment has been minimized.

Copy link

commented Sep 19, 2019

Codecov Report

Merging #521 into master will increase coverage by 0.14%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master     #521      +/-   ##
==========================================
+ Coverage   90.18%   90.33%   +0.14%     
==========================================
  Files         201      201              
  Lines       14914    14924      +10     
==========================================
+ Hits        13450    13481      +31     
+ Misses       1187     1166      -21     
  Partials      277      277
Impacted Files Coverage Δ
...lanet.Tests/Blockchain/Policies/BlockPolicyTest.cs 98.7% <ø> (ø) ⬆️
Libplanet.Tests/Store/LiteDBStoreFixture.cs 93.75% <100%> (+2.08%) ⬆️
Libplanet.Tests/Blockchain/BlockChainTest.cs 98.53% <100%> (ø) ⬆️
Libplanet/Store/LiteDBStore.cs 89.87% <100%> (+0.62%) ⬆️
Libplanet.Tests/Net/SwarmTest.cs 99.09% <100%> (+1.2%) ⬆️
Libplanet/Net/Protocols/KademliaProtocol.cs 60.86% <0%> (+0.86%) ⬆️
@dahlia
dahlia approved these changes Sep 20, 2019
@earlbread earlbread merged commit 6f59615 into planetarium:master Sep 20, 2019
17 checks passed
17 checks passed
WIP Ready for review
Details
changelog This contains self-describing changelog.
Details
codecov/patch 100% of diff hit (target 90.18%)
Details
codecov/project 90.33% (+0.14%) compared to eaf8e45
Details
docs Libplanet docs generated by DocFX
Details
license/cla Contributor License Agreement is signed.
Details
planetarium.libplanet Build #20190919.17 succeeded
Details
planetarium.libplanet (Linux_Mono) Linux_Mono succeeded
Details
planetarium.libplanet (Linux_NETCore) Linux_NETCore succeeded
Details
planetarium.libplanet (Windows_Mono) Windows_Mono succeeded
Details
planetarium.libplanet (Windows_NETCore) Windows_NETCore succeeded
Details
planetarium.libplanet (Windows_NETCore_Benchmark) Windows_NETCore_Benchmark succeeded
Details
planetarium.libplanet (Windows_NETCore_coverage) Windows_NETCore_coverage succeeded
Details
planetarium.libplanet (Windows_NETFramework) Windows_NETFramework succeeded
Details
planetarium.libplanet (macOS_Mono) macOS_Mono succeeded
Details
planetarium.libplanet (macOS_NETCore) macOS_NETCore succeeded
Details
planetarium.libplanet (macOS_Unity) macOS_Unity succeeded
Details
@earlbread earlbread deleted the earlbread:litedb-memory branch Sep 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.