This commit is contained in:
@@ -21,7 +21,7 @@ namespace raven_integration
|
|||||||
{
|
{
|
||||||
ApiTextResponse t = await Util.GetTextResultAsync("LogFiles/log-ayanova.txt", await Util.GetTokenAsync("OpsAdminFull"));
|
ApiTextResponse t = await Util.GetTextResultAsync("LogFiles/log-ayanova.txt", await Util.GetTokenAsync("OpsAdminFull"));
|
||||||
Util.ValidateHTTPStatusCode(t, 200);
|
Util.ValidateHTTPStatusCode(t, 200);
|
||||||
string[] ExpectedLogItems = {"|INFO|","|ERROR|", "|WARN|"};//assumes any log will have at least one of these items in it
|
string[] ExpectedLogItems = {"|INFO|","|ERROR|","|FATAL|", "|WARN|"};//assumes any log will have at least one of these items in it
|
||||||
t.TextResponse.Should().ContainAny(ExpectedLogItems);
|
t.TextResponse.Should().ContainAny(ExpectedLogItems);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -594,6 +594,25 @@ namespace raven_integration
|
|||||||
[Fact]
|
[Fact]
|
||||||
public async void CustomFieldSearchShouldWork()
|
public async void CustomFieldSearchShouldWork()
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
|
Failing on huge data test after many hours:
|
||||||
|
|
||||||
|
[xUnit.net 00:00:21.49] raven_integration.SearchOps.CustomFieldSearchShouldWork [FAIL]
|
||||||
|
X raven_integration.SearchOps.CustomFieldSearchShouldWork [1s 84ms]
|
||||||
|
Error Message:
|
||||||
|
Expected MatchingIdList {109274L, 109095L, 108919L, 108740L, 108558L, 108382L, 108201L, 108021L, 107842L, 107663L, 107487L, 107305L, 107126L, 106947L, 106768L, 106589L, 106413L, 106233L, 106052L, 105873L, 105692L, 105510L, 105341L, 105157L, 104978L, 104799L, 104620L, 104441L, 104262L, 104084L, 103906L, 103725L, .468 more.} to contain 195378L because ShouldContainMatchingCustomFieldWidgetId.
|
||||||
|
Stack Trace:
|
||||||
|
at FluentAssertions.Execution.XUnit2TestFramework.Throw(String message)
|
||||||
|
at FluentAssertions.Execution.TestFrameworkProvider.Throw(String message)
|
||||||
|
at FluentAssertions.Execution.DefaultAssertionStrategy.HandleFailure(String message)
|
||||||
|
at FluentAssertions.Execution.AssertionScope.FailWith(Func`1 failReasonFunc)
|
||||||
|
at FluentAssertions.Collections.SelfReferencingCollectionAssertions`2.Contain(T expected, String because, Object[] becauseArgs)
|
||||||
|
at raven_integration.SearchOps.CustomFieldSearchShouldWork() in c:\data\code\raven-test-integration\Search\SearchOps.cs:line 644
|
||||||
|
at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__139_0(Object state)
|
||||||
|
|
||||||
|
Likely fix is to force order to most recent or simply to delete after test so they don't build up into a huge list
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
//CREATE CUSTOM FIELD DATA TO SEARCH FOR (note must use already defined template so c2 is the text one)
|
//CREATE CUSTOM FIELD DATA TO SEARCH FOR (note must use already defined template so c2 is the text one)
|
||||||
dynamic dCustomField = new JObject();
|
dynamic dCustomField = new JObject();
|
||||||
@@ -631,9 +650,7 @@ namespace raven_integration
|
|||||||
((JArray)a.ObjectResponse["data"]["searchResults"]).Count.Should().BeGreaterOrEqualTo(1);//might be a successive run and still have some left so account for more than one return
|
((JArray)a.ObjectResponse["data"]["searchResults"]).Count.Should().BeGreaterOrEqualTo(1);//might be a successive run and still have some left so account for more than one return
|
||||||
|
|
||||||
//Turn the list into an array of id's
|
//Turn the list into an array of id's
|
||||||
var v = ((JArray)a.ObjectResponse["data"]["searchResults"]);
|
var v = ((JArray)a.ObjectResponse["data"]["searchResults"]);
|
||||||
// v.Count.Should().Be(1);
|
|
||||||
// v[0]["id"].Value<long>().Should().Be(MatchingWidgetId);
|
|
||||||
List<long> MatchingIdList = new List<long>();
|
List<long> MatchingIdList = new List<long>();
|
||||||
foreach (JObject j in v)
|
foreach (JObject j in v)
|
||||||
{
|
{
|
||||||
@@ -643,6 +660,11 @@ namespace raven_integration
|
|||||||
//Ensure the expected items are returned
|
//Ensure the expected items are returned
|
||||||
MatchingIdList.Should().Contain(MatchingWidgetId, "ShouldContainMatchingCustomFieldWidgetId");
|
MatchingIdList.Should().Contain(MatchingWidgetId, "ShouldContainMatchingCustomFieldWidgetId");
|
||||||
|
|
||||||
|
//Now delete the newly created one so the list doesn't build up and prevent this test from working in big runs...
|
||||||
|
//DELETE
|
||||||
|
ApiResponse DELETETestResponse = await Util.DeleteAsync("Widget/" + MatchingWidgetId.ToString(), await Util.GetTokenAsync("manager", "l3tm3in"));
|
||||||
|
Util.ValidateHTTPStatusCode(DELETETestResponse, 204);
|
||||||
|
|
||||||
|
|
||||||
}//eot
|
}//eot
|
||||||
//==================================================
|
//==================================================
|
||||||
|
|||||||
14
burntest.bat
14
burntest.bat
@@ -1,8 +1,10 @@
|
|||||||
SET /a VAR=0
|
@SET /a VAR=0
|
||||||
:HOME
|
:HOME
|
||||||
SET /a VAR=VAR+1
|
@SET /a VAR=VAR+1
|
||||||
rem 1000 runs in local debug mode server is about 6 hours at current test pace with huge data
|
@rem 1000 runs in local debug mode server is about 6 hours at current test pace with huge data
|
||||||
IF %VAR%==1000 goto :End
|
@IF %VAR%==1000 goto :End
|
||||||
dotnet test
|
@ECHO TEST RUN %VAR% STARTED AT %TIME%
|
||||||
goto :HOME
|
@dotnet test
|
||||||
|
@ECHO TEST RUN %VAR% COMPLETED AT %TIME%
|
||||||
|
@goto :HOME
|
||||||
:End
|
:End
|
||||||
Reference in New Issue
Block a user