Skip to content

Commit

Permalink
tests: add options in htc mock and bench that will be propagated to t…
Browse files Browse the repository at this point in the history
…ask options
  • Loading branch information
aneojgurhem committed Mar 29, 2024
1 parent d73aea9 commit ad97961
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Tests/Bench/Client/src/Options/BenchOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.

using System.Collections.Generic;

using ArmoniK.Api.gRPC.V1;

using JetBrains.Annotations;
Expand Down Expand Up @@ -99,4 +101,9 @@ public class BenchOptions
/// Purge data from the created session
/// </summary>
public bool PurgeData { get; set; } = true;

/// <summary>
/// Dictionary to put into task options
/// </summary>
public Dictionary<string, string> Options { get; set; } = new();
}
1 change: 1 addition & 0 deletions Tests/Bench/Client/src/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ private static async Task Main()
{
"ResultSize", benchOptions.ResultSize.ToString()
},
benchOptions.Options,
},
},
PartitionIds =
Expand Down
1 change: 1 addition & 0 deletions Tests/HtcMock/Client/src/GridClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ public ISessionClient CreateSession()
{
"TaskRpcException", optionsHtcMock_.TaskRpcException
},
optionsHtcMock_.Options,
},
},
PartitionIds =
Expand Down
6 changes: 6 additions & 0 deletions Tests/HtcMock/Client/src/Options/HtcMock.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.

using System;
using System.Collections.Generic;

using ArmoniK.Api.gRPC.V1;

Expand All @@ -34,6 +35,11 @@ public class HtcMock
/// </summary>
public const string SettingSection = nameof(HtcMock);

/// <summary>
/// Dictionary to put into task options
/// </summary>
public Dictionary<string, string> Options { get; set; } = new();

/// <summary>
/// Number of computing tasks (there are some supplementary aggregation tasks)
/// </summary>
Expand Down

0 comments on commit ad97961

Please sign in to comment.