-
Notifications
You must be signed in to change notification settings - Fork 202
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #200 from madelson/release-2.4
Release 2.4
- Loading branch information
Showing
130 changed files
with
9,516 additions
and
478 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
# Developing DistributedLock | ||
|
||
## Installing back-ends for testing | ||
|
||
DistributedLock has a variety of back-ends; to be able to develop and run tests against all of them you'll need to install a good amount of software. | ||
|
||
### Azure | ||
|
||
For the Azure back-end, [Azurite](https://learn.microsoft.com/en-us/azure/storage/common/storage-use-azurite) is used for local development. See [here](https://learn.microsoft.com/en-us/azure/storage/common/storage-use-azurite?tabs=visual-studio%2Cblob-storage#install-azurite) for how to install. | ||
|
||
### MySQL | ||
|
||
The MySQL driver covers both MySQL and MariaDB; so we'll need to install both. | ||
|
||
#### MariaDB | ||
|
||
The MariaDB installer can be downloaded [here](https://mariadb.org/download/?t=mariadb&p=mariadb&os=windows&cpu=x86_64&pkg=msi&m=acorn). | ||
|
||
After downloading, you'll need to enable the performance_schema which is used by DistributedLock's tests. You can do this by adding the following to your my.ini/my.cnf file (C:\Program Files\MariaDB {version}\data\my.ini on windows): | ||
|
||
```ini | ||
# activates the performance_schema tables which are needed by DistributedLock tests | ||
performance_schema=ON | ||
``` | ||
|
||
After doing this, restart MariaDB (on Windows, do this in the Services app). | ||
|
||
Next, create the `distributed_lock` database and a user for the tests to run as: | ||
```sql | ||
CREATE DATABASE distributed_lock; | ||
CREATE USER 'DistributedLock'@'localhost' IDENTIFIED BY '<password>'; | ||
GRANT ALL PRIVILEGES ON distributed_lock.* TO 'DistributedLock'@'localhost'; | ||
GRANT SELECT ON performance_schema.* TO 'DistributedLock'@'localhost'; | ||
``` | ||
|
||
Finally, add your username (DistributedLock) and password to `DistributedLock.Tests/credentials/mariadb.txt`, with the username on line 1 and the password on line 2. | ||
|
||
#### MySQL | ||
|
||
You can install MySQL from [here](https://dev.mysql.com/downloads/mysql/). Run on port 3307 to avoid conflicting with MariaDB. | ||
|
||
Add your username and password to `DistributedLock.Tests/credentials/mysql.txt`, with the username on line 1 and the password on line 2. | ||
|
||
### Oracle | ||
|
||
You can install Oracle from [here](https://www.oracle.com/database/technologies/oracle-database-software-downloads.html#db_free). It claims not to support Windows 11 Home, but it seems to install and work fine. | ||
|
||
Add your username (e.g. SYSTEM) and password to `DistributedLock.Tests/credentials/oracle.txt`, with the username on line 1 and the password on line 2. | ||
|
||
If the Oracle tests fail with `ORA-12541: TNS:no listener`, you may have to start the OracleOraDB21Home1TNSListener service in services.svc and/or restart the OracleServiceXE. After starting these it can take a few minutes for the DB to come online. | ||
|
||
### Postgres | ||
|
||
You can install Postgres from [here](https://www.enterprisedb.com/downloads/postgres-postgresql-downloads). | ||
|
||
In `C:\Program Files\PostgreSQL\<version>\data\postgresql.conf`, update `max_connections` to 200. | ||
|
||
Add your username (e.g. postgres) and password to `DistributedLock.Tests/credentials/postgres.txt`, with the username on line 1 and the password on line 2. | ||
|
||
### SQL Server | ||
|
||
Download SQL developer edition from [here](https://www.microsoft.com/en-us/sql-server/sql-server-downloads). | ||
|
||
The tests connect via integrated security. | ||
|
||
### Redis | ||
|
||
Install Redis locally. On Windows, install it via WSL as described [here](https://developer.redis.com/create/windows/). | ||
|
||
You do not need it running as a service: the tests will start and stop instances automatically. | ||
|
||
### ZooKeeper | ||
|
||
Download a ZooKeeper installation by going to [https://zookeeper.apache.org/](https://zookeeper.apache.org/)->Documentation->Release ...->Getting Started->Download->stable. | ||
|
||
Extract the zip archive, and within it copy `zoo_sample.cfg` to `zoo.cfg`. | ||
|
||
Add the full path of the extracted directory (the one containing README.md, bin, conf, etc) to `DistributedLock.Tests/credentials/zookeeper.txt` as a single line. | ||
|
||
Also, install Java Development Kit (JDK) because ZooKeeper runs on Java. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<Project> | ||
<PropertyGroup> | ||
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile> | ||
<!-- Recommended in https://devblogs.microsoft.com/dotnet/creating-aot-compatible-libraries/ --> | ||
<IsAotCompatible Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net7.0'))">true</IsAotCompatible> | ||
<PackageReadmeFile>package.readme.md</PackageReadmeFile> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<!-- See https://learn.microsoft.com/en-us/nuget/reference/errors-and-warnings/nu5039#solution --> | ||
<None Include="$(MSBuildThisFileDirectory)package.readme.md" Pack="true" PackagePath="" /> | ||
</ItemGroup> | ||
</Project> |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<Project> | ||
<PropertyGroup> | ||
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally> | ||
<CentralPackageTransitivePinningEnabled>true</CentralPackageTransitivePinningEnabled> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="8.0.0" /> | ||
<PackageVersion Include="Microsoft.CodeAnalysis.PublicApiAnalyzers" Version="3.3.4" /> | ||
<PackageVersion Include="Azure.Storage.Blobs" Version="12.19.1" /> | ||
<PackageVersion Include="Nullable" Version="1.3.1" Condition="'$(TargetFramework)' != 'netstandard2.1'" /> | ||
<PackageVersion Include="MySqlConnector" Version="2.3.5" /> | ||
<PackageVersion Include="Oracle.ManagedDataAccess.Core" Version="3.21.130" Condition="'$(TargetFramework)' == 'netstandard2.1'" /> | ||
<PackageVersion Include="Oracle.ManagedDataAccess" Version="21.13.0" Condition="'$(TargetFramework)' == 'net462'"/> | ||
<PackageVersion Include="Npgsql" Version="8.0.2" /> | ||
<PackageVersion Include="StackExchange.Redis" Version="2.7.27" /> | ||
<PackageVersion Include="Microsoft.Data.SqlClient" Version="5.2.0" /> | ||
<PackageVersion Include="nunit" Version="3.14.0" /> | ||
<PackageVersion Include="nunit3testadapter" Version="4.5.0" /> | ||
<PackageVersion Include="Microsoft.NET.Test.SDK" Version="17.9.0" /> | ||
<PackageVersion Include="MedallionShell.StrongName" Version="1.6.2" /> | ||
<PackageVersion Include="System.Data.SqlClient" Version="4.8.6" /> | ||
<PackageVersion Include="Moq" Version="4.20.70" /> | ||
<PackageVersion Include="System.Threading.AccessControl" Version="8.0.0" Condition="'$(TargetFramework)' != 'net462'" /> | ||
<PackageVersion Include="ZooKeeperNetEx" Version="3.4.12.4" /> | ||
<PackageVersion Include="IsExternalInit" Version="1.0.3" /> | ||
<PackageVersion Include="Microsoft.Bcl.AsyncInterfaces" Version="8.0.0" Condition="'$(TargetFramework)' == 'netstandard2.0' OR '$(TargetFramework)' == 'net462'" /> | ||
<PackageVersion Include="System.ValueTuple" Version="4.5.0" Condition="'$(TargetFramework)' == 'net462'" /> | ||
</ItemGroup> | ||
</Project> |
Oops, something went wrong.