Weighted Shortest Job First Hub

This commit is contained in:
2025-01-28 13:29:28 -07:00
parent ca4ebff54c
commit 08a23114c9
15 changed files with 834 additions and 270 deletions

View File

@ -1,5 +1,6 @@
#if true
using Adaptation.FileHandlers.json.WorkItems;
using Adaptation.FileHandlers.Priority;
using Adaptation.Shared;
using Adaptation.Shared.Methods;
using Microsoft.VisualStudio.TestTools.UnitTesting;
@ -173,8 +174,8 @@ public class MESAFIBACKLOG
{
string check = "*.json";
bool validatePDSF = false;
_MESAFIBACKLOG.Development__v2_58_0__MESAFIBACKLOG__ADO();
MethodBase methodBase = new StackFrame().GetMethod();
_MESAFIBACKLOG.Development__v2_58_0__MESAFIBACKLOG__ADO();
Assert.IsFalse(string.IsNullOrEmpty(_MESAFIBACKLOG.AdaptationTesting.TestContext.FullyQualifiedTestClassName));
string[] variables = _MESAFIBACKLOG.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _MESAFIBACKLOG.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
@ -185,5 +186,35 @@ public class MESAFIBACKLOG
NonThrowTryCatch();
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Development__v2_58_0__MESAFIBACKLOG__Priority638323658386612552__Normal()
{
string check = "*.json";
bool validatePDSF = false;
MethodBase methodBase = new StackFrame().GetMethod();
_MESAFIBACKLOG.Development__v2_58_0__MESAFIBACKLOG__Priority();
Assert.IsFalse(string.IsNullOrEmpty(_MESAFIBACKLOG.AdaptationTesting.TestContext.FullyQualifiedTestClassName));
string[] variables = _MESAFIBACKLOG.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _MESAFIBACKLOG.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResult = fileRead.ReExtract();
Assert.IsFalse(string.IsNullOrEmpty(extractResult?.Item1));
Assert.IsNotNull(extractResult.Item3);
Assert.IsNotNull(extractResult.Item4);
WeightedShortestJobFirstHub weightedShortestJobFirstHub = new();
Notification notification = new(fibonacci: null,
id: 1107438888,
inverse: null,
page: "effort",
remoteIpAddress: "10.95.36.87",
site: "MES",
time: 1737573418926,
value: 1);
weightedShortestJobFirstHub.NotifyAll(notification);
NonThrowTryCatch();
}
}
#endif