Skip to content

Commit

Permalink
Updated Azure Pipelines connection string to improve parallel patchin…
Browse files Browse the repository at this point in the history
…g tests
  • Loading branch information
oskardudycz committed Feb 6, 2023
1 parent 33e363a commit 4d9ede4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ variables:
dotnet_version: '7.x'
node_version: 16.x
pg_db: marten_testing
marten_testing_database: "Host=localhost;Port=5432;Database=marten_testing;Username=postgres;Password=Password12!"
marten_testing_database: "Host=localhost;Port=5432;Database=marten_testing;Username=postgres;Password=Password12!;Timeout=60;Cancellation Timeout=5000; Command Timeout=60"

jobs:
- job: build_net6
Expand Down
11 changes: 9 additions & 2 deletions src/Marten.PLv8.Testing/Patching/Bug_2460_parallel_patching.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,31 @@
using System.Linq;
using System.Threading.Tasks;
using Marten.PLv8.Patching;
using Marten.PLv8.Transforms;
using Marten.Testing.Harness;
using Shouldly;
using Weasel.Core;
using Xunit;

namespace Marten.PLv8.Testing.Patching;

public class Bug_2460_parallel_patching: BugIntegrationContext
{
private const int itemsCount = 100;
private const int itemsCount = 50;
private const int patchedNumber = 1337;

[Fact(Skip = "Fix in https://github.com/JasperFx/marten/pull/2468")]
public async Task can_support_parallel_processing()
{
using var store = SeparateStore(_ =>
_.UseJavascriptTransformsAndPatching()
{
_.UseJavascriptTransformsAndPatching();
_.Schema.For<ItemForPatching>();
_.AutoCreateSchemaObjects = AutoCreate.None;
}
);
await store.Storage.Database.ApplyAllConfiguredChangesToDatabaseAsync();
await store.Tenancy.Default.Database.EnsureStorageExistsAsync(typeof(TransformSchema));

// Delete old items
await store.Advanced.Clean.DeleteDocumentsByTypeAsync(typeof(ItemForPatching));
Expand Down

0 comments on commit 4d9ede4

Please sign in to comment.