Skip to content
Snippets Groups Projects
Commit 219d08d6 authored by Janis Daniel Dähne's avatar Janis Daniel Dähne
Browse files

- added test server timings protocol to tst results

  - TODO migration
parent 5f00bb10
No related branches found
No related tags found
No related merge requests found
......@@ -1564,6 +1564,7 @@ namespace ClientServer.Controllers.Core.Testing
CompileTimeoutInMsUsed = testResult.CompileTimeoutInMsUsed,
CharacterLimitExceeded = testResult.CharacterLimitExceeded,
CharacterLimitUsed = testResult.CharacterLimitUsed,
TimingsProtocol = testResult.TestServerDebugTimings,
};
_context.TestWithSingleSolutionAsTestResult.Add(oldResult);
......@@ -1585,6 +1586,7 @@ namespace ClientServer.Controllers.Core.Testing
oldResult.CompileTimeoutInMsUsed = testResult.CompileTimeoutInMsUsed;
oldResult.CharacterLimitExceeded = testResult.CharacterLimitExceeded;
oldResult.CharacterLimitUsed = testResult.CharacterLimitUsed;
oldResult.TimingsProtocol = testResult.TestServerDebugTimings;
}
try
......@@ -1915,6 +1917,7 @@ namespace ClientServer.Controllers.Core.Testing
CompileTimeoutInMsUsed = testResult.CompileTimeoutInMsUsed,
CharacterLimitExceeded = testResult.CharacterLimitExceeded,
CharacterLimitUsed = testResult.CharacterLimitUsed,
TimingsProtocol = testResult.TestServerDebugTimings,
};
_context.TestWithAfterSolutionAsTestResults.Add(oldResult);
......@@ -1936,6 +1939,7 @@ namespace ClientServer.Controllers.Core.Testing
oldResult.CompileTimeoutInMsUsed = testResult.CompileTimeoutInMsUsed;
oldResult.CharacterLimitExceeded = testResult.CharacterLimitExceeded;
oldResult.CharacterLimitUsed = testResult.CharacterLimitUsed;
oldResult.TimingsProtocol = testResult.TestServerDebugTimings;
}
try
......@@ -2363,6 +2367,7 @@ namespace ClientServer.Controllers.Core.Testing
CompileTimeoutInMsUsed = testResult.CompileTimeoutInMsUsed,
CharacterLimitExceeded = testResult.CharacterLimitExceeded,
CharacterLimitUsed = testResult.CharacterLimitUsed,
TimingsProtocol = testResult.TestServerDebugTimings,
};
_context.CustomTestWithSingleSolutionAsTestResult.Add(oldResult);
......@@ -2384,6 +2389,7 @@ namespace ClientServer.Controllers.Core.Testing
oldResult.CompileTimeoutInMsUsed = testResult.CompileTimeoutInMsUsed;
oldResult.CharacterLimitExceeded = testResult.CharacterLimitExceeded;
oldResult.CharacterLimitUsed = testResult.CharacterLimitUsed;
oldResult.TimingsProtocol = testResult.TestServerDebugTimings;
}
try
......@@ -2597,7 +2603,8 @@ namespace ClientServer.Controllers.Core.Testing
TimeoutInMsUsed = testResult.TimeoutInMsUsed,
CompileTimeoutInMsUsed = testResult.CompileTimeoutInMsUsed,
CharacterLimitExceeded = testResult.CharacterLimitExceeded,
CharacterLimitUsed = testResult.CharacterLimitUsed
CharacterLimitUsed = testResult.CharacterLimitUsed,
TimingsProtocol = testResult.TestServerDebugTimings,
};
_context.CustomProjectTestWithSolutionAsTestResults.Add(oldResult);
......@@ -2619,6 +2626,7 @@ namespace ClientServer.Controllers.Core.Testing
oldResult.CompileTimeoutInMsUsed = testResult.CompileTimeoutInMsUsed;
oldResult.CharacterLimitExceeded = testResult.CharacterLimitExceeded;
oldResult.CharacterLimitUsed = testResult.CharacterLimitUsed;
oldResult.TimingsProtocol = testResult.TestServerDebugTimings;
}
try
......@@ -3179,6 +3187,7 @@ namespace ClientServer.Controllers.Core.Testing
CharacterLimitExceeded = testResult.CharacterLimitExceeded,
CharacterLimitUsed = YapexDbContext.TestProtocolMaxStringLength,
HasMoreTestProtocolLines = hasMoreTestProtocolLines,
TestServerDebugTimings = testResult.TestServerDebugTimings
});
}
......@@ -3764,6 +3773,7 @@ namespace ClientServer.Controllers.Core.Testing
public class ResponseFromTestServerBase
{
public static readonly string TimingsStringSeparator = "\n";
/// <summary>
/// the response code <see cref="TestServerResponseCode"/>
/// </summary>
......@@ -3774,6 +3784,14 @@ namespace ClientServer.Controllers.Core.Testing
/// </summary>
public string Message { get; set; }
/// <summary>
/// can be null if we don't debug log timings
/// this has no free format and might change,
/// might have multiple lines separated by <see cref="TimingsStringSeparator"/>
/// normally we always get timings and we decide here (in this backend) if we want to store/keep the timings
/// </summary>
public string DebugTimings { get; set; }
//Data is another prop here... maybe use generic?
}
......@@ -3802,6 +3820,14 @@ namespace ClientServer.Controllers.Core.Testing
/// some more information about the test if any error occurred
/// </summary>
public string TestServerMessage { get; set; }
/// <summary>
/// can be null if we don't debug log timings
/// this has no free format and might change,
/// might have multiple lines separated by <see cref="ResponseFromTestServerBase.TimingsStringSeparator"/>
/// normally we always get timings and we decide here (in this backend) if we want to store/keep the timings
/// </summary>
public string TestServerDebugTimings { get; set; }
/// <summary>
/// the test id
......
......@@ -15,6 +15,7 @@ namespace ClientServer.Helpers
/// </summary>
Ok = 0,
/// <summary>
/// NOT USED ANYMORE
/// the max paralllel tests are reached, retrsy later
/// </summary>
MaxParallelTestsReached = 1,
......@@ -31,9 +32,10 @@ namespace ClientServer.Helpers
/// </summary>
FileSystemIssue = 4,
/// <summary>
/// ip was not in the ip access file
/// the unique request id string was null or empty
/// the string must be a valid file name!!
/// </summary>
IpNotAccepted = 50,
NoUniqueRequestIdStringProvided = 5,
/// <summary>
/// some other internal server error (e.g. config could not be read)
/// </summary>
......
using System.ComponentModel.DataAnnotations;
using ClientServer.Controllers.Core.Testing;
using ClientServer.Db;
using ClientServer.Models.Interfaces;
......@@ -41,6 +42,13 @@ namespace ClientServer.Models.CustomProjects
[MaxLength(YapexDbContext.TestProtocolMaxStringLength)]
public string Protocol { get; set; }
/// <summary>
/// debug protocol that stores timings as a string
/// lines are separated by <see cref="ResponseFromTestServerBase.TimingsStringSeparator"/>
/// </summary>
[MaxLength(YapexDbContext.TestContentMaxStringLength)]
public string TimingsProtocol { get; set; }
/// <summary>
/// the test runner version
/// can be null
......
using System.ComponentModel.DataAnnotations;
using ClientServer.Controllers.Core.Testing;
using ClientServer.Db;
using ClientServer.Models.Exercises.Tests;
using ClientServer.Models.Interfaces;
......@@ -48,6 +49,13 @@ namespace ClientServer.Models.Exercises.AfterSolutions
[MaxLength(YapexDbContext.TestProtocolMaxStringLength)]
public string Protocol { get; set; }
/// <summary>
/// debug protocol that stores timings as a string
/// lines are separated by <see cref="ResponseFromTestServerBase.TimingsStringSeparator"/>
/// </summary>
[MaxLength(YapexDbContext.TestContentMaxStringLength)]
public string TimingsProtocol { get; set; }
/// <summary>
/// can be null
/// </summary>
......
using System.ComponentModel.DataAnnotations;
using ClientServer.Controllers.Core.Testing;
using ClientServer.Db;
using ClientServer.Models.Exercises.Tests;
using ClientServer.Models.Interfaces;
......@@ -50,6 +51,13 @@ namespace ClientServer.Models.Exercises.AfterSolutions
[MaxLength(YapexDbContext.TestProtocolMaxStringLength)]
public string Protocol { get; set; }
/// <summary>
/// debug protocol that stores timings as a string
/// lines are separated by <see cref="ResponseFromTestServerBase.TimingsStringSeparator"/>
/// </summary>
[MaxLength(YapexDbContext.TestContentMaxStringLength)]
public string TimingsProtocol { get; set; }
/// <summary>
/// can be null
/// </summary>
......
......@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;
using ClientServer.Controllers.Core.Testing;
using ClientServer.Db;
using ClientServer.Models.Exercises.Tests;
using ClientServer.Models.Interfaces;
......@@ -58,6 +59,13 @@ namespace ClientServer.Models.Exercises.Solution
[MaxLength(YapexDbContext.TestProtocolMaxStringLength)]
public string Protocol { get; set; }
/// <summary>
/// debug protocol that stores timings as a string
/// lines are separated by <see cref="ResponseFromTestServerBase.TimingsStringSeparator"/>
/// </summary>
[MaxLength(YapexDbContext.TestContentMaxStringLength)]
public string TimingsProtocol { get; set; }
/// <summary>
/// can be null
/// </summary>
......
using System.ComponentModel.DataAnnotations;
using ClientServer.Controllers.Core.Testing;
using ClientServer.Db;
using ClientServer.Models.Exercises.Release;
using ClientServer.Models.Exercises.Tests;
......@@ -60,6 +61,13 @@ namespace ClientServer.Models.Exercises.Solution
[MaxLength(YapexDbContext.TestProtocolMaxStringLength)]
public string Protocol { get; set; }
/// <summary>
/// debug protocol that stores timings as a string
/// lines are separated by <see cref="ResponseFromTestServerBase.TimingsStringSeparator"/>
/// </summary>
[MaxLength(YapexDbContext.TestContentMaxStringLength)]
public string TimingsProtocol { get; set; }
/// <summary>
/// can be null
/// </summary>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment