29 references to AllocatePort
Aspire.Hosting.Tests (29)
Dcp\ProxylessEndpointPortAllocatorTests.cs (29)
23Assert.Equal(10002, allocator.AllocatePort(CreateEndpoint("a"))); 24Assert.Equal(10003, allocator.AllocatePort(CreateEndpoint("b"))); 25Assert.Equal(10004, allocator.AllocatePort(CreateEndpoint("c"))); 38Assert.Equal(10002, allocator.AllocatePort(CreateEndpoint("a"))); 39Assert.Equal(10003, allocator.AllocatePort(CreateEndpoint("b"))); 56allocator.AllocatePort(CreateEndpoint("a")), 57allocator.AllocatePort(CreateEndpoint("b")), 58allocator.AllocatePort(CreateEndpoint("c")), 59allocator.AllocatePort(CreateEndpoint("d")) 65allocator.AllocatePort(CreateEndpoint("e")); 80Assert.Equal(10000, allocator.AllocatePort(endpoint)); 81Assert.Equal(10000, allocator.AllocatePort(endpoint)); 82Assert.Equal(10001, allocator.AllocatePort(CreateEndpoint("other"))); 166Assert.Equal(port, firstApplicationAllocator.AllocatePort(CreateEndpoint("dashboard"))); 169Assert.Throws<InvalidOperationException>(() => secondApplicationAllocator.AllocatePort(CreateEndpoint("webapp"))); 174Assert.Equal(port, laterApplicationAllocator.AllocatePort(CreateEndpoint("webapp"))); 196Assert.Equal(10000, first.AllocatePort(CreateEndpoint("a"))); 198Assert.Equal(10002, second.AllocatePort(CreateEndpoint("a"))); 209Assert.Equal(10000, third.AllocatePort(CreateEndpoint("a"))); 210Assert.Equal(10001, third.AllocatePort(CreateEndpoint("b"))); 211Assert.Equal(10003, third.AllocatePort(CreateEndpoint("c"))); 232Assert.Equal(10001, first.AllocatePort(CreateEndpoint("a"))); 243Assert.Equal(10001, second.AllocatePort(CreateEndpoint("a"))); 259Assert.Equal(10001, third.AllocatePort(CreateEndpoint("a"))); 265Assert.Throws<InvalidOperationException>(() => third.AllocatePort(CreateEndpoint("b"))); 269Assert.Equal(10000, third.AllocatePort(CreateEndpoint("b"))); 282Assert.Equal(10001, allocator.AllocatePort(CreateEndpoint("a"))); 298Assert.Equal(10001, prober.AllocatePort(CreateEndpoint("a"))); 316Assert.Throws<InvalidTimeZoneException>(() => allocator.AllocatePort(CreateEndpoint("a")));