2023-04-17 05:56:08 +00:00
|
|
|
|
using DistTestCore;
|
2023-03-23 11:35:03 +00:00
|
|
|
|
using NUnit.Framework;
|
2023-09-20 08:59:52 +00:00
|
|
|
|
using Tests;
|
2023-03-23 11:35:03 +00:00
|
|
|
|
|
2023-09-20 08:59:52 +00:00
|
|
|
|
namespace CodexLongTests.BasicTests
|
2023-03-23 11:35:03 +00:00
|
|
|
|
{
|
2023-09-20 08:59:52 +00:00
|
|
|
|
public class TestInfraTests : CodexDistTest
|
2023-03-23 11:35:03 +00:00
|
|
|
|
{
|
|
|
|
|
[Test, UseLongTimeouts]
|
|
|
|
|
public void TestInfraShouldHave1000AddressSpacesPerPod()
|
|
|
|
|
{
|
2023-09-20 08:59:52 +00:00
|
|
|
|
var group = AddCodex(1000, s => s.EnableMetrics());
|
2023-03-23 11:35:03 +00:00
|
|
|
|
|
|
|
|
|
var nodeIds = group.Select(n => n.GetDebugInfo().id).ToArray();
|
|
|
|
|
|
|
|
|
|
Assert.That(nodeIds.Length, Is.EqualTo(nodeIds.Distinct().Count()),
|
|
|
|
|
"Not all created nodes provided a unique id.");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Test, UseLongTimeouts]
|
|
|
|
|
public void TestInfraSupportsManyConcurrentPods()
|
|
|
|
|
{
|
|
|
|
|
for (var i = 0; i < 20; i++)
|
|
|
|
|
{
|
2023-09-20 08:59:52 +00:00
|
|
|
|
var n = AddCodex();
|
2023-03-23 11:35:03 +00:00
|
|
|
|
|
|
|
|
|
Assert.That(!string.IsNullOrEmpty(n.GetDebugInfo().id));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|