-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
feat: Add .NET 8.0 support for Oracle persistence provider and improve test infrastructure #1369
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
base: master
Are you sure you want to change the base?
Changes from all commits
5c5c8d6
7e3cfb4
df17d34
cb9fd84
47e34b2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,50 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<AssemblyTitle>Workflow Core Oracle Persistence Provider</AssemblyTitle> | ||
<VersionPrefix>1.0.0</VersionPrefix> | ||
<Authors>Christian Jundt</Authors> | ||
<TargetFrameworks>net6.0</TargetFrameworks> | ||
<AssemblyName>WorkflowCore.Persistence.Oracle</AssemblyName> | ||
<PackageId>WorkflowCore.Persistence.Oracle</PackageId> | ||
<PackageTags>workflow;.NET;Core;state machine;WorkflowCore;Oracle</PackageTags> | ||
<PackageProjectUrl>https://github.com/danielgerlag/workflow-core</PackageProjectUrl> | ||
<PackageLicenseUrl>https://github.com/danielgerlag/workflow-core/blob/master/LICENSE.md</PackageLicenseUrl> | ||
<RepositoryType>git</RepositoryType> | ||
<RepositoryUrl>https://github.com/danielgerlag/workflow-core.git</RepositoryUrl> | ||
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute> | ||
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute> | ||
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute> | ||
<Description>Provides support to persist workflows running on Workflow Core to a Oracle database.</Description> | ||
</PropertyGroup> | ||
<PropertyGroup> | ||
<AssemblyTitle>Workflow Core Oracle Persistence Provider</AssemblyTitle> | ||
<VersionPrefix>1.0.0</VersionPrefix> | ||
<Authors>Christian Jundt</Authors> | ||
<TargetFrameworks>net6.0;net8.0</TargetFrameworks> | ||
<AssemblyName>WorkflowCore.Persistence.Oracle</AssemblyName> | ||
<PackageId>WorkflowCore.Persistence.Oracle</PackageId> | ||
<PackageTags>workflow;.NET;Core;state machine;WorkflowCore;Oracle</PackageTags> | ||
<PackageProjectUrl>https://github.com/danielgerlag/workflow-core</PackageProjectUrl> | ||
<PackageLicenseUrl>https://github.com/danielgerlag/workflow-core/blob/master/LICENSE.md</PackageLicenseUrl> | ||
<RepositoryType>git</RepositoryType> | ||
<RepositoryUrl>https://github.com/danielgerlag/workflow-core.git</RepositoryUrl> | ||
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute> | ||
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute> | ||
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute> | ||
<Description>Provides support to persist workflows running on Workflow Core to a Oracle database.</Description> | ||
</PropertyGroup> | ||
|
||
<ItemGroup Condition=" '$(TargetFramework)' == 'net6.0' "> | ||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.*" /> | ||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="7.*"> | ||
<PrivateAssets>All</PrivateAssets> | ||
</PackageReference> | ||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="7.*"> | ||
<PrivateAssets>all</PrivateAssets> | ||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> | ||
</PackageReference> | ||
<PackageReference Include="Oracle.EntityFrameworkCore"> | ||
<Version>7.21.13</Version> | ||
</PackageReference> | ||
</ItemGroup> | ||
<ItemGroup Condition=" '$(TargetFramework)' == 'net8.0' "> | ||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="8.*"> | ||
<PrivateAssets>All</PrivateAssets> | ||
</PackageReference> | ||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.*"> | ||
<PrivateAssets>all</PrivateAssets> | ||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> | ||
</PackageReference> | ||
<PackageReference Include="Oracle.EntityFrameworkCore" Version="8.*" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\..\WorkflowCore\WorkflowCore.csproj" /> | ||
<ProjectReference Include="..\WorkflowCore.Persistence.EntityFramework\WorkflowCore.Persistence.EntityFramework.csproj" /> | ||
</ItemGroup> | ||
<ItemGroup Condition=" '$(TargetFramework)' == 'net6.0' "> | ||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="7.*"> | ||
<PrivateAssets>All</PrivateAssets> | ||
</PackageReference> | ||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="7.*"> | ||
<PrivateAssets>all</PrivateAssets> | ||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> | ||
</PackageReference> | ||
<PackageReference Include="Oracle.EntityFrameworkCore"> | ||
<Version>7.21.13</Version> | ||
</PackageReference> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\..\WorkflowCore\WorkflowCore.csproj" /> | ||
<ProjectReference Include="..\WorkflowCore.Persistence.EntityFramework\WorkflowCore.Persistence.EntityFramework.csproj" /> | ||
</ItemGroup> | ||
|
||
</Project> |
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
@@ -1,8 +1,6 @@ | ||||||||||
using System; | ||||||||||
using WorkflowCore.Interface; | ||||||||||
using WorkflowCore.Interface; | ||||||||||
using WorkflowCore.Persistence.EntityFramework.Services; | ||||||||||
using WorkflowCore.Persistence.Oracle; | ||||||||||
using WorkflowCore.Tests.Oracle; | ||||||||||
using WorkflowCore.UnitTests; | ||||||||||
using Xunit; | ||||||||||
using Xunit.Abstractions; | ||||||||||
|
@@ -12,10 +10,10 @@ namespace WorkflowCore.Tests.Oracle | |||||||||
[Collection("Oracle collection")] | ||||||||||
public class OraclePersistenceProviderFixture : BasePersistenceFixture | ||||||||||
{ | ||||||||||
private readonly IPersistenceProvider _subject; | ||||||||||
private readonly EntityFrameworkPersistenceProvider _subject; | ||||||||||
protected override IPersistenceProvider Subject => _subject; | ||||||||||
|
||||||||||
public OraclePersistenceProviderFixture(OracleDockerSetup dockerSetup, ITestOutputHelper output) | ||||||||||
public OraclePersistenceProviderFixture(ITestOutputHelper output) | ||||||||||
{ | ||||||||||
output.WriteLine($"Connecting on {OracleDockerSetup.ConnectionString}"); | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The constructor parameter 'dockerSetup' of type 'OracleDockerSetup' was removed, but the class still inherits from a collection fixture that provides this dependency. The test fixture may fail to initialize properly without accessing the Docker setup.
Suggested change
Copilot uses AI. Check for mistakes. Positive FeedbackNegative Feedback |
||||||||||
_subject = new EntityFrameworkPersistenceProvider(new OracleContextFactory(OracleDockerSetup.ConnectionString), true, true); | ||||||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,34 @@ | ||
using System; | ||
using System.Threading.Tasks; | ||
|
||
using System.Threading.Tasks; | ||
using Testcontainers.Oracle; | ||
using Xunit; | ||
|
||
namespace WorkflowCore.Tests.Oracle | ||
{ | ||
public class OracleDockerSetup : IAsyncLifetime | ||
{ | ||
public static string ConnectionString => "Data Source=(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = ORCLPDB1) ) );User ID=TEST_WF;Password=test;"; | ||
private readonly OracleContainer _oracleContainer; | ||
|
||
public async Task InitializeAsync() | ||
public static string ConnectionString { get; private set; } | ||
|
||
public OracleDockerSetup() | ||
{ | ||
_oracleContainer = new OracleBuilder() | ||
.WithImage("gvenzl/oracle-free:latest") | ||
.WithUsername("TEST_WF") | ||
.WithPassword("test") | ||
.Build(); | ||
} | ||
|
||
public Task DisposeAsync() | ||
public async Task InitializeAsync() | ||
{ | ||
return Task.CompletedTask; | ||
await _oracleContainer.StartAsync(); | ||
// Build connection string manually since TestContainers might not provide Oracle-specific format | ||
ConnectionString = $"Data Source=localhost:{_oracleContainer.GetMappedPublicPort(1521)}/FREEPDB1;User Id=TEST_WF;Password=test;"; | ||
} | ||
|
||
public async Task DisposeAsync() => await _oracleContainer.DisposeAsync(); | ||
} | ||
|
||
[CollectionDefinition("Oracle collection")] | ||
public class OracleCollection : ICollectionFixture<OracleDockerSetup> | ||
{ | ||
} | ||
public class OracleCollection : ICollectionFixture<OracleDockerSetup> { } | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The word 'compability' should be 'compatibility'.
Copilot uses AI. Check for mistakes.