Skip to content

Commit

Permalink
Reset of the default "I do not know the revision, you Mr Database det…
Browse files Browse the repository at this point in the history
…ermine the revision" value to 0.
  • Loading branch information
jeremydmiller committed Jul 19, 2024
1 parent b81646e commit 016bf4d
Show file tree
Hide file tree
Showing 25 changed files with 19 additions and 12,113 deletions.
16 changes: 7 additions & 9 deletions src/DocumentDbTests/Concurrency/numeric_revisioning.cs
Original file line number Diff line number Diff line change
Expand Up @@ -280,35 +280,33 @@ public async Task update_revision_and_jumping_multiples()
[Fact]
public async Task overwrite_increments_version()
{
theSession.Logger = new TestOutputMartenLogger(_output);

var doc1 = new RevisionedDoc { Name = "Tim" };
theSession.Store(doc1);
theSession.SaveChanges();
await theSession.SaveChangesAsync();

doc1.Name = "Bill";
doc1.Version = 0;
theSession.Store(doc1);
theSession.SaveChanges();
await theSession.SaveChangesAsync();

doc1.Name = "Dru";
doc1.Version = 0;
theSession.Store(doc1);
theSession.SaveChanges();
await theSession.SaveChangesAsync();

var doc2 = new RevisionedDoc { Id = doc1.Id, Name = "Wrong", Version = 2};
theSession.UpdateRevision(doc2, doc1.Version + 1);
theSession.SaveChanges();
await theSession.SaveChangesAsync();

using var session2 =
theStore.OpenSession(new SessionOptions { ConcurrencyChecks = ConcurrencyChecks.Disabled });


session2.Logger = new TestOutputMartenLogger(_output);

doc2.Name = "Last";
doc2.Version = 0;
session2.Store(doc2);

session2.Logger = new TestOutputMartenLogger(_output);

await session2.SaveChangesAsync();

var doc3 = await session2.LoadAsync<RevisionedDoc>(doc1.Id);
Expand Down
Loading

0 comments on commit 016bf4d

Please sign in to comment.