Skip to content

Commit

Permalink
Enable Sqlite tests and disabled LocalSnapshotStoreSpec (#2724)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexvaluyskiy authored and Aaronontheweb committed Jun 6, 2017
1 parent d7ce425 commit 64254ad
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 48 deletions.
1 change: 0 additions & 1 deletion build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ Target "RunTests" (fun _ ->
-- "./**/Akka.MultiNodeTestRunner.Shared.Tests.csproj"
-- "./**/Akka.Persistence.Tests.csproj"
-- "./**/Akka.API.Tests.csproj"
-- "./**/Akka.Persistence.Sqlite.Tests.csproj"

let runSingleProject project =
DotNetCli.RunCommand
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<PropertyGroup>
<AssemblyTitle>Akka.Persistence.Sqlite.Tests</AssemblyTitle>
<TargetFrameworks>net452;netcoreapp1.1</TargetFrameworks>
<RuntimeIdentifier>win7-x64</RuntimeIdentifier>
<RuntimeIdentifier Condition=" '$(TargetFramework)' == 'net452' And '$(OS)' == 'Windows_NT'">win7-x64</RuntimeIdentifier>
<PackageTargetFallback Condition=" '$(TargetFramework)' == 'netcoreapp1.1' ">$(PackageTargetFallback);portable-net45+win8</PackageTargetFallback>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Data.SQLite" Version="2.0.0-preview1-final" />
<PackageReference Include="Microsoft.Data.SQLite" Version="1.1.1" />
</ItemGroup>

<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@

namespace Akka.Persistence.TestKit.Tests
{
public class LocalSnapshotStoreSpec : SnapshotStoreSpec
// FIXME
public abstract class LocalSnapshotStoreSpec : SnapshotStoreSpec
{
private readonly string _path;
public LocalSnapshotStoreSpec(ITestOutputHelper output)
Expand Down
44 changes: 0 additions & 44 deletions src/core/Akka.Persistence.TestKit/Snapshot/SnapshotStoreSpec.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,33 +80,21 @@ private IEnumerable<SnapshotMetadata> WriteSnapshots()
}
}

#if CORECLR
[Fact(Skip = "Fails on .NET Core")]
#else
[Fact]
#endif
public void SnapshotStore_should_not_load_a_snapshot_given_an_invalid_persistence_id()
{
SnapshotStore.Tell(new LoadSnapshot("invalid", SnapshotSelectionCriteria.Latest, long.MaxValue), _senderProbe.Ref);
_senderProbe.ExpectMsg<LoadSnapshotResult>(result => result.Snapshot == null && result.ToSequenceNr == long.MaxValue);
}

#if CORECLR
[Fact(Skip = "Fails on .NET Core")]
#else
[Fact]
#endif
public void SnapshotStore_should_not_load_a_snapshot_given_non_matching_timestamp_criteria()
{
SnapshotStore.Tell(new LoadSnapshot(Pid, new SnapshotSelectionCriteria(long.MaxValue, new DateTime(100000)), long.MaxValue), _senderProbe.Ref);
_senderProbe.ExpectMsg<LoadSnapshotResult>(result => result.Snapshot == null && result.ToSequenceNr == long.MaxValue);
}

#if CORECLR
[Fact(Skip = "Fails on .NET Core")]
#else
[Fact]
#endif
public void SnapshotStore_should_not_load_a_snapshot_given_non_matching_sequence_number_criteria()
{
SnapshotStore.Tell(new LoadSnapshot(Pid, new SnapshotSelectionCriteria(7), long.MaxValue), _senderProbe.Ref);
Expand All @@ -116,11 +104,7 @@ public void SnapshotStore_should_not_load_a_snapshot_given_non_matching_sequence
_senderProbe.ExpectMsg<LoadSnapshotResult>(result => result.Snapshot == null && result.ToSequenceNr == 7);
}

#if CORECLR
[Fact(Skip = "Fails on .NET Core")]
#else
[Fact]
#endif
public void SnapshotStore_should_load_the_most_recent_snapshot()
{
SnapshotStore.Tell(new LoadSnapshot(Pid, SnapshotSelectionCriteria.Latest, long.MaxValue), _senderProbe.Ref);
Expand All @@ -131,11 +115,7 @@ public void SnapshotStore_should_load_the_most_recent_snapshot()
&& result.Snapshot.Snapshot.ToString() == "s-5");
}

#if CORECLR
[Fact(Skip = "Fails on .NET Core")]
#else
[Fact]
#endif
public void SnapshotStore_should_load_the_most_recent_snapshot_matching_an_upper_sequence_number_bound()
{
SnapshotStore.Tell(new LoadSnapshot(Pid, new SnapshotSelectionCriteria(13), long.MaxValue), _senderProbe.Ref);
Expand All @@ -153,11 +133,7 @@ public void SnapshotStore_should_load_the_most_recent_snapshot_matching_an_upper
&& result.Snapshot.Snapshot.ToString() == "s-3");
}

#if CORECLR
[Fact(Skip = "Fails on .NET Core")]
#else
[Fact]
#endif
public void SnapshotStore_should_load_the_most_recent_snapshot_matching_an_upper_sequence_number_and_timestamp_bound()
{
SnapshotStore.Tell(new LoadSnapshot(Pid, new SnapshotSelectionCriteria(13, Metadata[2].Timestamp), long.MaxValue), _senderProbe.Ref);
Expand All @@ -175,11 +151,7 @@ public void SnapshotStore_should_load_the_most_recent_snapshot_matching_an_upper
&& result.Snapshot.Snapshot.ToString() == "s-3");
}

#if CORECLR
[Fact(Skip = "Fails on .NET Core")]
#else
[Fact]
#endif
public void SnapshotStore_should_delete_a_single_snapshot_identified_by_SequenceNr_in_snapshot_metadata()
{
var md = Metadata[2];
Expand All @@ -200,11 +172,7 @@ public void SnapshotStore_should_delete_a_single_snapshot_identified_by_Sequence
&& result.Snapshot.Snapshot.ToString() == "s-2");
}

#if CORECLR
[Fact(Skip = "Fails on .NET Core")]
#else
[Fact]
#endif
public void SnapshotStore_should_delete_all_snapshots_matching_upper_sequence_number_and_timestamp_bounds()
{
var md = Metadata[2];
Expand All @@ -228,11 +196,7 @@ public void SnapshotStore_should_delete_all_snapshots_matching_upper_sequence_nu
&& result.Snapshot.Snapshot.ToString() == "s-4");
}

#if CORECLR
[Fact(Skip = "Fails on .NET Core")]
#else
[Fact]
#endif
public void SnapshotStore_should_not_delete_snapshots_with_non_matching_upper_timestamp_bounds()
{
var md = Metadata[3];
Expand All @@ -253,11 +217,7 @@ public void SnapshotStore_should_not_delete_snapshots_with_non_matching_upper_ti
&& result.Snapshot.Snapshot.ToString() == "s-4");
}

#if CORECLR
[Fact(Skip = "Fails on .NET Core")]
#else
[Fact]
#endif
public void SnapshotStore_should_save_and_overwrite_snapshot_with_same_sequence_number()
{
var md = Metadata[4];
Expand All @@ -271,11 +231,7 @@ public void SnapshotStore_should_save_and_overwrite_snapshot_with_same_sequence_
// metadata timestamp may have been changed
}

#if CORECLR
[Fact(Skip = "Fails on .NET Core")]
#else
[Fact]
#endif
public void SnapshotStore_should_save_bigger_size_snapshot()
{
var metadata = new SnapshotMetadata(Pid, 100);
Expand Down

0 comments on commit 64254ad

Please sign in to comment.