Skip to content

Commit ae01368

Browse files
authored
Merge pull request #2529 from galvesribeiro/zookeeper
ZooKeeperUtils .Net Core support
2 parents fe258e5 + 9770273 commit ae01368

File tree

20 files changed

+705
-60
lines changed

20 files changed

+705
-60
lines changed

src/Orleans.sln

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio 14
4-
VisualStudioVersion = 14.0.25420.1
3+
# Visual Studio 15
4+
VisualStudioVersion = 15.0.26009.0
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{013DFD29-E1DB-4968-A67B-C2342E6F5B6E}"
77
ProjectSection(SolutionItems) = preProject
@@ -214,6 +214,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DefaultCluster.Tests", "..\
214214
EndProject
215215
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TesterSQLUtils", "..\test\TesterSQLUtils\TesterSQLUtils.csproj", "{5A620DF5-1461-4B31-96E0-925BBD10773C}"
216216
EndProject
217+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TesterZooKeeperUtils", "..\test\TesterZooKeeperUtils\TesterZooKeeperUtils.csproj", "{AFEC183D-C12A-4DFC-8DA9-A4895CF5D020}"
218+
EndProject
217219
Global
218220
GlobalSection(SolutionConfigurationPlatforms) = preSolution
219221
Debug|Any CPU = Debug|Any CPU
@@ -548,6 +550,14 @@ Global
548550
{5A620DF5-1461-4B31-96E0-925BBD10773C}.Release|Any CPU.Build.0 = Release|Any CPU
549551
{5A620DF5-1461-4B31-96E0-925BBD10773C}.Release|x64.ActiveCfg = Release|Any CPU
550552
{5A620DF5-1461-4B31-96E0-925BBD10773C}.Release|x64.Build.0 = Release|Any CPU
553+
{AFEC183D-C12A-4DFC-8DA9-A4895CF5D020}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
554+
{AFEC183D-C12A-4DFC-8DA9-A4895CF5D020}.Debug|Any CPU.Build.0 = Debug|Any CPU
555+
{AFEC183D-C12A-4DFC-8DA9-A4895CF5D020}.Debug|x64.ActiveCfg = Debug|Any CPU
556+
{AFEC183D-C12A-4DFC-8DA9-A4895CF5D020}.Debug|x64.Build.0 = Debug|Any CPU
557+
{AFEC183D-C12A-4DFC-8DA9-A4895CF5D020}.Release|Any CPU.ActiveCfg = Release|Any CPU
558+
{AFEC183D-C12A-4DFC-8DA9-A4895CF5D020}.Release|Any CPU.Build.0 = Release|Any CPU
559+
{AFEC183D-C12A-4DFC-8DA9-A4895CF5D020}.Release|x64.ActiveCfg = Release|Any CPU
560+
{AFEC183D-C12A-4DFC-8DA9-A4895CF5D020}.Release|x64.Build.0 = Release|Any CPU
551561
EndGlobalSection
552562
GlobalSection(SolutionProperties) = preSolution
553563
HideSolutionNode = FALSE
@@ -596,7 +606,8 @@ Global
596606
{B93B3853-FD54-4615-891A-9AFA3D9D32A2} = {01F3CC7E-F996-411E-AFD6-72673A826549}
597607
{003DFE72-F1CA-4E79-8A84-EDF5D277EB16} = {01F3CC7E-F996-411E-AFD6-72673A826549}
598608
{DEE80624-685B-4C84-99EC-C0A637B6FB34} = {01F3CC7E-F996-411E-AFD6-72673A826549}
599-
{EEEB9AC6-F50B-4275-AE72-1D56AC01A19B} = {01F3CC7E-F996-411E-AFD6-72673A826549}
609+
{EEEB9AC6-F50B-4275-AE72-1D56AC01A19B} = {01F3CC7E-F996-411E-AFD6-72673A826549}
600610
{5A620DF5-1461-4B31-96E0-925BBD10773C} = {01F3CC7E-F996-411E-AFD6-72673A826549}
611+
{AFEC183D-C12A-4DFC-8DA9-A4895CF5D020} = {01F3CC7E-F996-411E-AFD6-72673A826549}
601612
EndGlobalSection
602613
EndGlobal

src/Orleans/Properties/AssemblyInfo.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,4 @@
4242
[assembly: InternalsVisibleTo("Tester")]
4343
[assembly: InternalsVisibleTo("DefaultCluster.Tests")]
4444
[assembly: InternalsVisibleTo("Tester.SQLUtils")]
45+
[assembly: InternalsVisibleTo("Tester.ZooKeeperUtils")]

test/Tester/MembershipTests/LivenessTests.cs

Lines changed: 1 addition & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -362,52 +362,6 @@ public async Task Liveness_AWS_DynamoDB_5_Kill_Silo_1_With_Timers()
362362
await Do_Liveness_OracleTest_2(2, false, true);
363363
}
364364
}
365-
366-
public class LivenessTests_ZK : LivenessTestsBase
367-
{
368-
public LivenessTests_ZK(ITestOutputHelper output) : base(output)
369-
{
370-
}
371-
372-
public override TestCluster CreateTestCluster()
373-
{
374-
var options = new TestClusterOptions(2);
375-
options.ClusterConfiguration.Globals.DataConnectionString = TestDefaultConfiguration.ZooKeeperConnectionString;
376-
options.ClusterConfiguration.Globals.LivenessType = GlobalConfiguration.LivenessProviderType.ZooKeeper;
377-
options.ClusterConfiguration.PrimaryNode = null;
378-
options.ClusterConfiguration.Globals.SeedNodes.Clear();
379-
return new TestCluster(options);
380-
}
381-
382-
[Fact, TestCategory("Membership"), TestCategory("ZooKeeper")]
383-
public async Task Liveness_ZooKeeper_1()
384-
{
385-
await Do_Liveness_OracleTest_1();
386-
}
387-
388-
[Fact, TestCategory("Membership"), TestCategory("ZooKeeper")]
389-
public async Task Liveness_ZooKeeper_2_Restart_Primary()
390-
{
391-
await Do_Liveness_OracleTest_2(0);
392-
}
393-
394-
[Fact, TestCategory("Membership"), TestCategory("ZooKeeper")]
395-
public async Task Liveness_ZooKeeper_3_Restart_GW()
396-
{
397-
await Do_Liveness_OracleTest_2(1);
398-
}
399-
400-
[Fact, TestCategory("Membership"), TestCategory("ZooKeeper")]
401-
public async Task Liveness_ZooKeeper_4_Restart_Silo_1()
402-
{
403-
await Do_Liveness_OracleTest_2(2);
404-
}
405-
406-
[Fact, TestCategory("Membership"), TestCategory("ZooKeeper")]
407-
public async Task Liveness_ZooKeeper_5_Kill_Silo_1_With_Timers()
408-
{
409-
await Do_Liveness_OracleTest_2(2, false, true);
410-
}
411-
}
365+
412366
#endif
413367
}

test/Tester/Tester.csproj

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -185,10 +185,6 @@
185185
<Project>{40ee3b00-d381-485f-9c69-ff706837deed}</Project>
186186
<Name>OrleansTestingHost</Name>
187187
</ProjectReference>
188-
<ProjectReference Include="..\..\src\OrleansZooKeeperUtils\OrleansZooKeeperUtils.csproj">
189-
<Project>{45918dd2-53d9-4b27-bc6b-17c197dbc645}</Project>
190-
<Name>OrleansZooKeeperUtils</Name>
191-
</ProjectReference>
192188
<ProjectReference Include="..\..\src\Orleans\Orleans.csproj">
193189
<Project>{bc1bd60c-e7d8-4452-a21c-290aec8e2e74}</Project>
194190
<Name>Orleans</Name>

test/TesterInternal/TesterInternal.csproj

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,6 @@
116116
<Compile Include="StorageTests\StorageProviders\BaseJSONStorageProvider.cs" />
117117
<Compile Include="StorageTests\StorageProviders\FileStorageProvider.cs" />
118118
<Compile Include="StorageTests\StorageProviders\IJSONStateDataManager.cs" />
119-
<Compile Include="MembershipTests\ZookeeperMembershipTableTests.cs" />
120119
<Compile Include="StreamingTests\DynamicStreamProviderConfigurationTests.cs" />
121120
<Compile Include="StreamingTests\HaloStreamSubscribeTests.cs" />
122121
<Compile Include="StreamingTests\MultipleStreamsTestRunner.cs" />
@@ -173,10 +172,6 @@
173172
<Project>{40ee3b00-d381-485f-9c69-ff706837deed}</Project>
174173
<Name>OrleansTestingHost</Name>
175174
</ProjectReference>
176-
<ProjectReference Include="..\..\src\OrleansZooKeeperUtils\OrleansZooKeeperUtils.csproj">
177-
<Project>{45918dd2-53d9-4b27-bc6b-17c197dbc645}</Project>
178-
<Name>OrleansZooKeeperUtils</Name>
179-
</ProjectReference>
180175
<ProjectReference Include="..\..\src\Orleans\Orleans.csproj">
181176
<Project>{bc1bd60c-e7d8-4452-a21c-290aec8e2e74}</Project>
182177
<Name>Orleans</Name>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<runtime>
4+
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
5+
<dependentAssembly>
6+
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
7+
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
8+
</dependentAssembly>
9+
</assemblyBinding>
10+
</runtime>
11+
</configuration>
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
using Orleans.Runtime.Configuration;
2+
using Orleans.TestingHost;
3+
using System.Threading.Tasks;
4+
using TestExtensions;
5+
using UnitTests.MembershipTests;
6+
using Xunit;
7+
using Xunit.Abstractions;
8+
9+
namespace Tester.ZooKeeperUtils
10+
{
11+
public class LivenessTests_ZK : LivenessTestsBase
12+
{
13+
public LivenessTests_ZK(ITestOutputHelper output) : base(output)
14+
{
15+
}
16+
17+
public override TestCluster CreateTestCluster()
18+
{
19+
var options = new TestClusterOptions(2);
20+
options.ClusterConfiguration.Globals.DataConnectionString = TestDefaultConfiguration.ZooKeeperConnectionString;
21+
options.ClusterConfiguration.Globals.LivenessType = GlobalConfiguration.LivenessProviderType.ZooKeeper;
22+
options.ClusterConfiguration.PrimaryNode = null;
23+
options.ClusterConfiguration.Globals.SeedNodes.Clear();
24+
return new TestCluster(options);
25+
}
26+
27+
[Fact, TestCategory("Membership"), TestCategory("ZooKeeper")]
28+
public async Task Liveness_ZooKeeper_1()
29+
{
30+
await Do_Liveness_OracleTest_1();
31+
}
32+
33+
[Fact, TestCategory("Membership"), TestCategory("ZooKeeper")]
34+
public async Task Liveness_ZooKeeper_2_Restart_Primary()
35+
{
36+
await Do_Liveness_OracleTest_2(0);
37+
}
38+
39+
[Fact, TestCategory("Membership"), TestCategory("ZooKeeper")]
40+
public async Task Liveness_ZooKeeper_3_Restart_GW()
41+
{
42+
await Do_Liveness_OracleTest_2(1);
43+
}
44+
45+
[Fact, TestCategory("Membership"), TestCategory("ZooKeeper")]
46+
public async Task Liveness_ZooKeeper_4_Restart_Silo_1()
47+
{
48+
await Do_Liveness_OracleTest_2(2);
49+
}
50+
51+
[Fact, TestCategory("Membership"), TestCategory("ZooKeeper")]
52+
public async Task Liveness_ZooKeeper_5_Kill_Silo_1_With_Timers()
53+
{
54+
await Do_Liveness_OracleTest_2(2, false, true);
55+
}
56+
}
57+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
using System.Reflection;
2+
using System.Runtime.CompilerServices;
3+
using System.Runtime.InteropServices;
4+
5+
// General Information about an assembly is controlled through the following
6+
// set of attributes. Change these attribute values to modify the information
7+
// associated with an assembly.
8+
[assembly: AssemblyTitle("TesterZooKeeperUtils")]
9+
[assembly: AssemblyDescription("")]
10+
[assembly: AssemblyConfiguration("")]
11+
[assembly: AssemblyCompany("")]
12+
[assembly: AssemblyProduct("TesterZooKeeperUtils")]
13+
[assembly: AssemblyCopyright("Copyright © 2016")]
14+
[assembly: AssemblyTrademark("")]
15+
[assembly: AssemblyCulture("")]
16+
17+
// Setting ComVisible to false makes the types in this assembly not visible
18+
// to COM components. If you need to access a type in this assembly from
19+
// COM, set the ComVisible attribute to true on that type.
20+
[assembly: ComVisible(false)]
21+
22+
// The following GUID is for the ID of the typelib if this project is exposed to COM
23+
[assembly: Guid("afec183d-c12a-4dfc-8da9-a4895cf5d020")]
24+
25+
// Version information for an assembly consists of the following four values:
26+
//
27+
// Major Version
28+
// Minor Version
29+
// Build Number
30+
// Revision
31+
//
32+
// You can specify all the values or you can default the Build and Revision Numbers
33+
// by using the '*' as shown below:
34+
// [assembly: AssemblyVersion("1.0.*")]
35+
[assembly: AssemblyVersion("1.0.0.0")]
36+
[assembly: AssemblyFileVersion("1.0.0.0")]
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4+
<PropertyGroup>
5+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7+
<ProjectGuid>{AFEC183D-C12A-4DFC-8DA9-A4895CF5D020}</ProjectGuid>
8+
<OutputType>Library</OutputType>
9+
<AppDesignerFolder>Properties</AppDesignerFolder>
10+
<RootNamespace>Tester.ZooKeeperUtils</RootNamespace>
11+
<AssemblyName>Tester.ZooKeeperUtils</AssemblyName>
12+
<TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
13+
<FileAlignment>512</FileAlignment>
14+
</PropertyGroup>
15+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
16+
<DebugSymbols>true</DebugSymbols>
17+
<DebugType>full</DebugType>
18+
<Optimize>false</Optimize>
19+
<OutputPath>bin\Debug\</OutputPath>
20+
<DefineConstants>DEBUG;TRACE</DefineConstants>
21+
<ErrorReport>prompt</ErrorReport>
22+
<WarningLevel>4</WarningLevel>
23+
</PropertyGroup>
24+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
25+
<DebugType>pdbonly</DebugType>
26+
<Optimize>true</Optimize>
27+
<OutputPath>bin\Release\</OutputPath>
28+
<DefineConstants>TRACE</DefineConstants>
29+
<ErrorReport>prompt</ErrorReport>
30+
<WarningLevel>4</WarningLevel>
31+
</PropertyGroup>
32+
<ItemGroup>
33+
<Reference Include="System" />
34+
<Reference Include="System.Core" />
35+
<Reference Include="System.Xml.Linq" />
36+
<Reference Include="System.Data.DataSetExtensions" />
37+
<Reference Include="Microsoft.CSharp" />
38+
<Reference Include="System.Data" />
39+
<Reference Include="System.Net.Http" />
40+
<Reference Include="System.Xml" />
41+
</ItemGroup>
42+
<ItemGroup>
43+
<Compile Include="LivenessTests.cs" />
44+
<Compile Include="Properties\AssemblyInfo.cs" />
45+
<Compile Include="ZookeeperMembershipTableTests.cs" />
46+
</ItemGroup>
47+
<ItemGroup>
48+
<ProjectReference Include="..\..\src\OrleansProviders\OrleansProviders.csproj">
49+
<Project>{0054db14-2a92-4cc0-959e-a2c51f5e65d4}</Project>
50+
<Name>OrleansProviders</Name>
51+
</ProjectReference>
52+
<ProjectReference Include="..\..\src\OrleansRuntime\OrleansRuntime.csproj">
53+
<Project>{6ff2004c-cdf8-479c-bf27-c6bfe8ef93e0}</Project>
54+
<Name>OrleansRuntime</Name>
55+
</ProjectReference>
56+
<ProjectReference Include="..\..\src\OrleansTestingHost\OrleansTestingHost.csproj">
57+
<Project>{40ee3b00-d381-485f-9c69-ff706837deed}</Project>
58+
<Name>OrleansTestingHost</Name>
59+
</ProjectReference>
60+
<ProjectReference Include="..\..\src\OrleansZooKeeperUtils\OrleansZooKeeperUtils.csproj">
61+
<Project>{45918dd2-53d9-4b27-bc6b-17c197dbc645}</Project>
62+
<Name>OrleansZooKeeperUtils</Name>
63+
</ProjectReference>
64+
<ProjectReference Include="..\..\src\Orleans\Orleans.csproj">
65+
<Project>{bc1bd60c-e7d8-4452-a21c-290aec8e2e74}</Project>
66+
<Name>Orleans</Name>
67+
</ProjectReference>
68+
<ProjectReference Include="..\TesterInternal\TesterInternal.csproj">
69+
<Project>{09610024-f5b9-4065-9557-bd9e36a32421}</Project>
70+
<Name>TesterInternal</Name>
71+
</ProjectReference>
72+
<ProjectReference Include="..\Tester\Tester.csproj">
73+
<Project>{a9c8ffec-4947-4f04-ba73-1f17b329a55d}</Project>
74+
<Name>Tester</Name>
75+
</ProjectReference>
76+
<ProjectReference Include="..\TestExtensions\TestExtensions.csproj">
77+
<Project>{8fd242b4-eda9-42cd-ba39-e410b98add26}</Project>
78+
<Name>TestExtensions</Name>
79+
</ProjectReference>
80+
</ItemGroup>
81+
<ItemGroup>
82+
<None Include="App.config" />
83+
<None Include="project.json" />
84+
</ItemGroup>
85+
<ItemGroup>
86+
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
87+
</ItemGroup>
88+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
89+
</Project>

test/TesterInternal/MembershipTests/ZookeeperMembershipTableTests.cs renamed to test/TesterZooKeeperUtils/ZookeeperMembershipTableTests.cs

File renamed without changes.

0 commit comments

Comments
 (0)