You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by sb...@apache.org on 2015/11/24 10:17:25 UTC
[1/4] ignite git commit: IGNITE-1983: .NET: Fixed continuous query
tests.
Repository: ignite
Updated Branches:
refs/heads/ignite-sql-opt 51f669fb0 -> eed8e6aa6
IGNITE-1983: .NET: Fixed continuous query tests.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/dcbfbd29
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/dcbfbd29
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/dcbfbd29
Branch: refs/heads/ignite-sql-opt
Commit: dcbfbd290eebfaaf23ea1ec48edec2dc59227121
Parents: e4109f9
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Tue Nov 24 10:53:43 2015 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Tue Nov 24 10:53:43 2015 +0300
----------------------------------------------------------------------
.../Continuous/ContinuousQueryAbstractTest.cs | 26 ++++++++++++--------
1 file changed, 16 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/dcbfbd29/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/Continuous/ContinuousQueryAbstractTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/Continuous/ContinuousQueryAbstractTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/Continuous/ContinuousQueryAbstractTest.cs
index cb9542f..720483a 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/Continuous/ContinuousQueryAbstractTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/Continuous/ContinuousQueryAbstractTest.cs
@@ -76,7 +76,7 @@ namespace Apache.Ignite.Core.Tests.Cache.Query.Continuous
/** Cache name. */
private readonly string cacheName;
-
+
/// <summary>
/// Constructor.
/// </summary>
@@ -308,7 +308,7 @@ namespace Apache.Ignite.Core.Tests.Cache.Query.Continuous
// Put from local node.
int key1 = PrimaryKey(cache1);
cache1.GetAndPut(key1, Entry(key1));
- CheckFilterSingle(key1, null, Entry(key1));
+ CheckFilterSingle(key1, null, Entry(key1), !loc);
CheckCallbackSingle(key1, null, Entry(key1));
// Put from remote node.
@@ -322,7 +322,7 @@ namespace Apache.Ignite.Core.Tests.Cache.Query.Continuous
}
else
{
- CheckFilterSingle(key2, null, Entry(key2));
+ CheckFilterSingle(key2, null, Entry(key2), true);
CheckCallbackSingle(key2, null, Entry(key2));
}
@@ -330,7 +330,7 @@ namespace Apache.Ignite.Core.Tests.Cache.Query.Continuous
// Ignored put from local node.
cache1.GetAndPut(key1, Entry(key1 + 1));
- CheckFilterSingle(key1, Entry(key1), Entry(key1 + 1));
+ CheckFilterSingle(key1, Entry(key1), Entry(key1 + 1), !loc);
CheckNoCallback(100);
// Ignored put from remote node.
@@ -339,7 +339,7 @@ namespace Apache.Ignite.Core.Tests.Cache.Query.Continuous
if (loc)
CheckNoFilter(100);
else
- CheckFilterSingle(key2, Entry(key2), Entry(key2 + 1));
+ CheckFilterSingle(key2, Entry(key2), Entry(key2 + 1), true);
CheckNoCallback(100);
}
@@ -868,9 +868,15 @@ namespace Apache.Ignite.Core.Tests.Cache.Query.Continuous
/// <param name="expKey">Expected key.</param>
/// <param name="expOldVal">Expected old value.</param>
/// <param name="expVal">Expected value.</param>
- private void CheckFilterSingle(int expKey, BinarizableEntry expOldVal, BinarizableEntry expVal)
+ /// <param name="hasBackup">Whether there is a backup node to check..</param>
+ private void CheckFilterSingle(int expKey, BinarizableEntry expOldVal, BinarizableEntry expVal,
+ bool hasBackup = false)
{
CheckFilterSingle(expKey, expOldVal, expVal, 1000);
+
+ // Filter is called on each cache node (primary and backup)
+ if (hasBackup)
+ CheckFilterSingle(expKey, expOldVal, expVal, 1000);
}
/// <summary>
@@ -880,7 +886,7 @@ namespace Apache.Ignite.Core.Tests.Cache.Query.Continuous
/// <param name="expOldVal">Expected old value.</param>
/// <param name="expVal">Expected value.</param>
/// <param name="timeout">Timeout.</param>
- private void CheckFilterSingle(int expKey, BinarizableEntry expOldVal, BinarizableEntry expVal, int timeout)
+ private static void CheckFilterSingle(int expKey, BinarizableEntry expOldVal, BinarizableEntry expVal, int timeout)
{
FilterEvent evt;
@@ -895,7 +901,7 @@ namespace Apache.Ignite.Core.Tests.Cache.Query.Continuous
/// Ensure that no filter events are logged.
/// </summary>
/// <param name="timeout">Timeout.</param>
- private void CheckNoFilter(int timeout)
+ private static void CheckNoFilter(int timeout)
{
FilterEvent evt;
@@ -908,7 +914,7 @@ namespace Apache.Ignite.Core.Tests.Cache.Query.Continuous
/// <param name="expKey">Expected key.</param>
/// <param name="expOldVal">Expected old value.</param>
/// <param name="expVal">Expected new value.</param>
- private void CheckCallbackSingle(int expKey, BinarizableEntry expOldVal, BinarizableEntry expVal)
+ private static void CheckCallbackSingle(int expKey, BinarizableEntry expOldVal, BinarizableEntry expVal)
{
CheckCallbackSingle(expKey, expOldVal, expVal, 1000);
}
@@ -920,7 +926,7 @@ namespace Apache.Ignite.Core.Tests.Cache.Query.Continuous
/// <param name="expOldVal">Expected old value.</param>
/// <param name="expVal">Expected new value.</param>
/// <param name="timeout">Timeout.</param>
- private void CheckCallbackSingle(int expKey, BinarizableEntry expOldVal, BinarizableEntry expVal, int timeout)
+ private static void CheckCallbackSingle(int expKey, BinarizableEntry expOldVal, BinarizableEntry expVal, int timeout)
{
CallbackEvent evt;
[4/4] ignite git commit: Merge remote-tracking branch
'remotes/origin/ignite-1.5' into ignite-sql-opt
Posted by sb...@apache.org.
Merge remote-tracking branch 'remotes/origin/ignite-1.5' into ignite-sql-opt
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/eed8e6aa
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/eed8e6aa
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/eed8e6aa
Branch: refs/heads/ignite-sql-opt
Commit: eed8e6aa65228d69a48635802b5cf26af1467704
Parents: 51f669f 1136933
Author: sboikov <sb...@gridgain.com>
Authored: Tue Nov 24 12:16:58 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Tue Nov 24 12:16:58 2015 +0300
----------------------------------------------------------------------
.../Apache.Ignite.Benchmarks.csproj | 3 +++
.../Apache.Ignite.Core.Tests.TestDll.csproj | 2 ++
.../Apache.Ignite.Core.Tests.csproj | 2 ++
.../Continuous/ContinuousQueryAbstractTest.cs | 23 +++++++++++++++-----
.../Apache.Ignite.Core.csproj | 2 ++
.../Apache.Ignite.Core/Impl/Events/Events.cs | 8 ++++---
modules/platforms/dotnet/Apache.Ignite.sln | 6 ++---
.../dotnet/Apache.Ignite/Apache.Ignite.csproj | 2 ++
.../Apache.Ignite.Examples.csproj | 2 ++
.../Apache.Ignite.ExamplesDll.csproj | 2 ++
10 files changed, 40 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
[3/4] ignite git commit: IGNITE-1858: .NET: Updated project settings
to support VS2010-VS2015.
Posted by sb...@apache.org.
IGNITE-1858: .NET: Updated project settings to support VS2010-VS2015.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/11369331
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/11369331
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/11369331
Branch: refs/heads/ignite-sql-opt
Commit: 11369331955070758162fbbd3904552eef390049
Parents: 512fe6b
Author: Pavel Tupitsyn <pt...@gridgain.com>
Authored: Tue Nov 24 11:57:39 2015 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Tue Nov 24 11:57:39 2015 +0300
----------------------------------------------------------------------
.../Apache.Ignite.Benchmarks/Apache.Ignite.Benchmarks.csproj | 3 +++
.../Apache.Ignite.Core.Tests.TestDll.csproj | 2 ++
.../Apache.Ignite.Core.Tests/Apache.Ignite.Core.Tests.csproj | 2 ++
.../dotnet/Apache.Ignite.Core/Apache.Ignite.Core.csproj | 2 ++
.../dotnet/Apache.Ignite.Core/Impl/Events/Events.cs | 8 +++++---
modules/platforms/dotnet/Apache.Ignite.sln | 6 ++----
modules/platforms/dotnet/Apache.Ignite/Apache.Ignite.csproj | 2 ++
.../Apache.Ignite.Examples/Apache.Ignite.Examples.csproj | 2 ++
.../Apache.Ignite.ExamplesDll.csproj | 2 ++
9 files changed, 22 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/11369331/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Apache.Ignite.Benchmarks.csproj
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Apache.Ignite.Benchmarks.csproj b/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Apache.Ignite.Benchmarks.csproj
index 14b6466..f4c7894 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Apache.Ignite.Benchmarks.csproj
+++ b/modules/platforms/dotnet/Apache.Ignite.Benchmarks/Apache.Ignite.Benchmarks.csproj
@@ -19,10 +19,12 @@
<PlatformTarget>x86</PlatformTarget>
<OutputPath>bin\x86\Debug\</OutputPath>
<DefineConstants>DEBUG</DefineConstants>
+ <LangVersion>4</LangVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<PlatformTarget>x86</PlatformTarget>
<OutputPath>bin\x86\Release\</OutputPath>
+ <Optimize>true</Optimize>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<PlatformTarget>x64</PlatformTarget>
@@ -32,6 +34,7 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<PlatformTarget>x64</PlatformTarget>
<OutputPath>bin\x64\Release\</OutputPath>
+ <Optimize>true</Optimize>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>true</SignAssembly>
http://git-wip-us.apache.org/repos/asf/ignite/blob/11369331/modules/platforms/dotnet/Apache.Ignite.Core.Tests.TestDll/Apache.Ignite.Core.Tests.TestDll.csproj
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests.TestDll/Apache.Ignite.Core.Tests.TestDll.csproj b/modules/platforms/dotnet/Apache.Ignite.Core.Tests.TestDll/Apache.Ignite.Core.Tests.TestDll.csproj
index c333bda..ebc8043 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests.TestDll/Apache.Ignite.Core.Tests.TestDll.csproj
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests.TestDll/Apache.Ignite.Core.Tests.TestDll.csproj
@@ -19,6 +19,7 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<PlatformTarget>x86</PlatformTarget>
<OutputPath>bin\x86\Release\</OutputPath>
+ <Optimize>true</Optimize>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<PlatformTarget>x64</PlatformTarget>
@@ -27,6 +28,7 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<PlatformTarget>x64</PlatformTarget>
<OutputPath>bin\x64\Release\</OutputPath>
+ <Optimize>true</Optimize>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>true</SignAssembly>
http://git-wip-us.apache.org/repos/asf/ignite/blob/11369331/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Apache.Ignite.Core.Tests.csproj
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Apache.Ignite.Core.Tests.csproj b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Apache.Ignite.Core.Tests.csproj
index a5bb7a8..72c0210 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Apache.Ignite.Core.Tests.csproj
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Apache.Ignite.Core.Tests.csproj
@@ -25,6 +25,7 @@
<PlatformTarget>x64</PlatformTarget>
<OutputPath>bin\x64\Release\</OutputPath>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <Optimize>true</Optimize>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<PlatformTarget>x86</PlatformTarget>
@@ -36,6 +37,7 @@
<PlatformTarget>x86</PlatformTarget>
<OutputPath>bin\x86\Release\</OutputPath>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <Optimize>true</Optimize>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>true</SignAssembly>
http://git-wip-us.apache.org/repos/asf/ignite/blob/11369331/modules/platforms/dotnet/Apache.Ignite.Core/Apache.Ignite.Core.csproj
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Apache.Ignite.Core.csproj b/modules/platforms/dotnet/Apache.Ignite.Core/Apache.Ignite.Core.csproj
index d7db33e..ae10159 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Apache.Ignite.Core.csproj
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Apache.Ignite.Core.csproj
@@ -22,6 +22,7 @@
<PlatformTarget>x64</PlatformTarget>
<OutputPath>bin\x64\Release\</OutputPath>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <Optimize>true</Optimize>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<PlatformTarget>x86</PlatformTarget>
@@ -33,6 +34,7 @@
<PlatformTarget>x86</PlatformTarget>
<OutputPath>bin\x86\Release\</OutputPath>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <Optimize>true</Optimize>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>true</SignAssembly>
http://git-wip-us.apache.org/repos/asf/ignite/blob/11369331/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Events/Events.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Events/Events.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Events/Events.cs
index 098102a..783ba94 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Events/Events.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Events/Events.cs
@@ -134,8 +134,9 @@ namespace Apache.Ignite.Core.Impl.Events
{
AsyncInstance.RemoteQuery(filter, timeout, types);
- return GetFuture((futId, futTyp) => UU.TargetListenFutureForOperation(AsyncInstance.Target, futId, futTyp,
- (int) Op.RemoteQuery), convertFunc: ReadEvents<T>).Task;
+ // ReSharper disable once RedundantTypeArgumentsOfMethod (won't compile in VS2010)
+ return GetFuture<ICollection<T>>((futId, futTyp) => UU.TargetListenFutureForOperation(AsyncInstance.Target,
+ futId, futTyp, (int) Op.RemoteQuery), convertFunc: ReadEvents<T>).Task;
}
/** <inheritDoc /> */
@@ -251,7 +252,8 @@ namespace Apache.Ignite.Core.Impl.Events
{
AsyncInstance.WaitForLocal0(filter, ref hnd, types);
- var fut = GetFuture((futId, futTyp) => UU.TargetListenFutureForOperation(AsyncInstance.Target, futId,
+ // ReSharper disable once RedundantTypeArgumentsOfMethod (won't compile in VS2010)
+ var fut = GetFuture<T>((futId, futTyp) => UU.TargetListenFutureForOperation(AsyncInstance.Target, futId,
futTyp, (int) Op.WaitForLocal), convertFunc: reader => (T) EventReader.Read<IEvent>(reader));
if (filter != null)
http://git-wip-us.apache.org/repos/asf/ignite/blob/11369331/modules/platforms/dotnet/Apache.Ignite.sln
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.sln b/modules/platforms/dotnet/Apache.Ignite.sln
index 6b29e9d..929af73 100644
--- a/modules/platforms/dotnet/Apache.Ignite.sln
+++ b/modules/platforms/dotnet/Apache.Ignite.sln
@@ -1,8 +1,6 @@
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 2013
-VisualStudioVersion = 12.0.31101.0
-MinimumVisualStudioVersion = 10.0.40219.1
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Apache.Ignite.Core", "Apache.Ignite.Core\Apache.Ignite.Core.csproj", "{4CD2F726-7E2B-46C4-A5BA-057BB82EECB6}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Apache.Ignite.Core.Tests", "Apache.Ignite.Core.Tests\Apache.Ignite.Core.Tests.csproj", "{6A62F66C-DA5B-4FBB-8CE7-A95F740FDC7A}"
http://git-wip-us.apache.org/repos/asf/ignite/blob/11369331/modules/platforms/dotnet/Apache.Ignite/Apache.Ignite.csproj
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite/Apache.Ignite.csproj b/modules/platforms/dotnet/Apache.Ignite/Apache.Ignite.csproj
index a58a660..fa7d6cf 100644
--- a/modules/platforms/dotnet/Apache.Ignite/Apache.Ignite.csproj
+++ b/modules/platforms/dotnet/Apache.Ignite/Apache.Ignite.csproj
@@ -19,6 +19,7 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<PlatformTarget>x64</PlatformTarget>
<OutputPath>bin\x64\Release\</OutputPath>
+ <Optimize>true</Optimize>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<PlatformTarget>x86</PlatformTarget>
@@ -27,6 +28,7 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<PlatformTarget>x86</PlatformTarget>
<OutputPath>bin\x86\Release\</OutputPath>
+ <Optimize>true</Optimize>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>true</SignAssembly>
http://git-wip-us.apache.org/repos/asf/ignite/blob/11369331/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Apache.Ignite.Examples.csproj
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Apache.Ignite.Examples.csproj b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Apache.Ignite.Examples.csproj
index e28ab75..a693930 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Apache.Ignite.Examples.csproj
+++ b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Apache.Ignite.Examples.csproj
@@ -21,6 +21,7 @@
<OutputPath>bin\x64\Release\</OutputPath>
<DebugType>full</DebugType>
<DebugSymbols>true</DebugSymbols>
+ <Optimize>true</Optimize>
</PropertyGroup>
<PropertyGroup>
<StartupObject>Apache.Ignite.Examples.Compute.TaskExample</StartupObject>
@@ -35,6 +36,7 @@
<OutputPath>bin\x86\Release\</OutputPath>
<PlatformTarget>x86</PlatformTarget>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
+ <Optimize>true</Optimize>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>true</SignAssembly>
http://git-wip-us.apache.org/repos/asf/ignite/blob/11369331/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Apache.Ignite.ExamplesDll.csproj
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Apache.Ignite.ExamplesDll.csproj b/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Apache.Ignite.ExamplesDll.csproj
index 60e1ec7..59d2866 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Apache.Ignite.ExamplesDll.csproj
+++ b/modules/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/Apache.Ignite.ExamplesDll.csproj
@@ -21,6 +21,7 @@
<OutputPath>bin\x64\Release\</OutputPath>
<DebugType>full</DebugType>
<DebugSymbols>true</DebugSymbols>
+ <Optimize>true</Optimize>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
@@ -32,6 +33,7 @@
<OutputPath>bin\x86\Release\</OutputPath>
<PlatformTarget>x86</PlatformTarget>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
+ <Optimize>true</Optimize>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>true</SignAssembly>
[2/4] ignite git commit: IGNITE-1983: .NET: Fixed continuous query
tests.
Posted by sb...@apache.org.
IGNITE-1983: .NET: Fixed continuous query tests.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/512fe6b0
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/512fe6b0
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/512fe6b0
Branch: refs/heads/ignite-sql-opt
Commit: 512fe6b076331a3d187e1e0277f6bd565d8350bf
Parents: dcbfbd2
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Tue Nov 24 11:52:06 2015 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Tue Nov 24 11:52:06 2015 +0300
----------------------------------------------------------------------
.../Continuous/ContinuousQueryAbstractTest.cs | 29 ++++++++++++--------
1 file changed, 18 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/512fe6b0/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/Continuous/ContinuousQueryAbstractTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/Continuous/ContinuousQueryAbstractTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/Continuous/ContinuousQueryAbstractTest.cs
index 720483a..bdca918 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/Continuous/ContinuousQueryAbstractTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/Continuous/ContinuousQueryAbstractTest.cs
@@ -308,7 +308,7 @@ namespace Apache.Ignite.Core.Tests.Cache.Query.Continuous
// Put from local node.
int key1 = PrimaryKey(cache1);
cache1.GetAndPut(key1, Entry(key1));
- CheckFilterSingle(key1, null, Entry(key1), !loc);
+ CheckFilterSingle(key1, null, Entry(key1));
CheckCallbackSingle(key1, null, Entry(key1));
// Put from remote node.
@@ -322,7 +322,7 @@ namespace Apache.Ignite.Core.Tests.Cache.Query.Continuous
}
else
{
- CheckFilterSingle(key2, null, Entry(key2), true);
+ CheckFilterSingle(key2, null, Entry(key2));
CheckCallbackSingle(key2, null, Entry(key2));
}
@@ -330,7 +330,7 @@ namespace Apache.Ignite.Core.Tests.Cache.Query.Continuous
// Ignored put from local node.
cache1.GetAndPut(key1, Entry(key1 + 1));
- CheckFilterSingle(key1, Entry(key1), Entry(key1 + 1), !loc);
+ CheckFilterSingle(key1, Entry(key1), Entry(key1 + 1));
CheckNoCallback(100);
// Ignored put from remote node.
@@ -339,7 +339,7 @@ namespace Apache.Ignite.Core.Tests.Cache.Query.Continuous
if (loc)
CheckNoFilter(100);
else
- CheckFilterSingle(key2, Entry(key2), Entry(key2 + 1), true);
+ CheckFilterSingle(key2, Entry(key2), Entry(key2 + 1));
CheckNoCallback(100);
}
@@ -621,6 +621,7 @@ namespace Apache.Ignite.Core.Tests.Cache.Query.Continuous
.Deserialize<BinarizableEntry>());
// 2. Remote put.
+ ClearEvents();
cache1.GetAndPut(PrimaryKey(cache2), Entry(2));
Assert.IsTrue(FILTER_EVTS.TryTake(out filterEvt, 500));
@@ -868,15 +869,10 @@ namespace Apache.Ignite.Core.Tests.Cache.Query.Continuous
/// <param name="expKey">Expected key.</param>
/// <param name="expOldVal">Expected old value.</param>
/// <param name="expVal">Expected value.</param>
- /// <param name="hasBackup">Whether there is a backup node to check..</param>
- private void CheckFilterSingle(int expKey, BinarizableEntry expOldVal, BinarizableEntry expVal,
- bool hasBackup = false)
+ private void CheckFilterSingle(int expKey, BinarizableEntry expOldVal, BinarizableEntry expVal)
{
CheckFilterSingle(expKey, expOldVal, expVal, 1000);
-
- // Filter is called on each cache node (primary and backup)
- if (hasBackup)
- CheckFilterSingle(expKey, expOldVal, expVal, 1000);
+ ClearEvents();
}
/// <summary>
@@ -895,6 +891,17 @@ namespace Apache.Ignite.Core.Tests.Cache.Query.Continuous
Assert.AreEqual(expKey, evt.entry.Key);
Assert.AreEqual(expOldVal, evt.entry.OldValue);
Assert.AreEqual(expVal, evt.entry.Value);
+
+ ClearEvents();
+ }
+
+ /// <summary>
+ /// Clears the events collection.
+ /// </summary>
+ private static void ClearEvents()
+ {
+ while (FILTER_EVTS.Count > 0)
+ FILTER_EVTS.Take();
}
/// <summary>