forked from ravendb/ravendb
-
Notifications
You must be signed in to change notification settings - Fork 0
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 ravendb#19024 from ppekrol/v6.2
6.1 to 6.2 merge
- Loading branch information
Showing
14 changed files
with
217 additions
and
95 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
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
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
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,39 @@ | ||
using System; | ||
using System.Threading.Tasks; | ||
using FastTests; | ||
using Raven.Client.Documents; | ||
using SlowTests.Core.Utils.Entities; | ||
using SlowTests.Core.Utils.Indexes; | ||
using Tests.Infrastructure; | ||
using Xunit; | ||
using Xunit.Abstractions; | ||
|
||
namespace SlowTests.Issues; | ||
|
||
public class RavenDB_22750 : RavenTestBase | ||
{ | ||
public RavenDB_22750(ITestOutputHelper output) : base(output) | ||
{ | ||
} | ||
|
||
[RavenFact(RavenTestCategory.Querying)] | ||
public async Task IndexTimestamp_And_LastQueryTime_Needs_To_Have_DateTimeKind_Specified() | ||
{ | ||
using (var store = GetDocumentStore()) | ||
{ | ||
await new Companies_ByEmployeeLastName().ExecuteAsync(store); | ||
|
||
Indexes.WaitForIndexing(store); | ||
|
||
using (var session = store.OpenAsyncSession()) | ||
{ | ||
await session.Query<Company, Companies_ByEmployeeLastName>() | ||
.Statistics(out var stats) | ||
.ToListAsync(); | ||
|
||
Assert.Equal(DateTimeKind.Utc, stats.IndexTimestamp.Kind); | ||
Assert.Equal(DateTimeKind.Utc, stats.LastQueryTime.Kind); | ||
} | ||
} | ||
} | ||
} |
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,45 @@ | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using FastTests; | ||
using Raven.Client; | ||
using Raven.Client.Documents.Indexes; | ||
using Raven.Client.Documents.Operations.Indexes; | ||
using Raven.Tests.Core.Utils.Entities; | ||
using Tests.Infrastructure; | ||
using Xunit; | ||
using Xunit.Abstractions; | ||
|
||
namespace SlowTests.Issues; | ||
|
||
public class RavenDB_22753 : RavenTestBase | ||
{ | ||
public RavenDB_22753(ITestOutputHelper output) : base(output) | ||
{ | ||
} | ||
|
||
[RavenFact(RavenTestCategory.ClientApi | RavenTestCategory.Indexes)] | ||
public void MustSendSearchEngineType() | ||
{ | ||
using var store = GetDocumentStore(); | ||
|
||
IndexCreation.CreateIndexes(new [] | ||
{ | ||
new Users_ByName() | ||
}, store); | ||
|
||
IndexDefinition[] indexDefinitions = store.Maintenance.Send(new GetIndexesOperation(0, 1)); | ||
|
||
Assert.Contains(Constants.Configuration.Indexes.IndexingStaticSearchEngineType, (IDictionary<string, string>) indexDefinitions[0].Configuration); | ||
Assert.Equal("Corax", indexDefinitions[0].Configuration[Constants.Configuration.Indexes.IndexingStaticSearchEngineType]); | ||
} | ||
|
||
private class Users_ByName : AbstractIndexCreationTask<User> | ||
{ | ||
public Users_ByName() | ||
{ | ||
Map = users => from u in users select new { Name = u.Name, LastName = u.LastName }; | ||
|
||
SearchEngineType = Raven.Client.Documents.Indexes.SearchEngineType.Corax; | ||
} | ||
} | ||
} |
Oops, something went wrong.