3 writes to EffectivePort
Aspire.Hosting (1)
Dcp\Model\Service.cs (1)
109Status.EffectivePort = other.Status.EffectivePort;
Aspire.Hosting.Tests (2)
Dcp\TestKubernetesService.cs (2)
86svc.Status.EffectivePort = svc.Spec.Port ?? Interlocked.Increment(ref _nextPort); 242service.Status.EffectivePort = hostPort ?? Interlocked.Increment(ref _nextPort);
49 references to EffectivePort
Aspire.Hosting (3)
Dcp\Model\Service.cs (3)
89public int? AllocatedPort => Spec.Port ?? Status?.EffectivePort; 107if (other.Status?.EffectivePort is not null) 109Status.EffectivePort = other.Status.EffectivePort;
Aspire.Hosting.Tests (46)
Dcp\DcpExecutorTests.cs (43)
638Assert.True(svc.Status?.EffectivePort >= TestKubernetesService.StartOfAutoPortRange); 670Assert.Equal(desiredPort, svc.Status?.EffectivePort); 702Assert.True(svc.Status?.EffectivePort >= TestKubernetesService.StartOfAutoPortRange); 735Assert.Equal(desiredPort, svc.Status?.EffectivePort); 786Assert.Equal(desiredPort, svc.Status?.EffectivePort); 815Assert.Equal(desiredPort, svc.Status?.EffectivePort); 850Assert.Equal(desiredPort, svc.Status?.EffectivePort); 887Assert.True(svc.Status?.EffectivePort >= TestKubernetesService.StartOfAutoPortRange); 888Assert.NotEqual(desiredPort, svc.Status?.EffectivePort); 924Assert.Equal(desiredPort, svc.Status?.EffectivePort); 955Assert.Equal(desiredPort, svc.Status?.EffectivePort); 986Assert.Equal(desiredPort, svc.Status?.EffectivePort); 1018Assert.Equal(desiredPort, svc.Status?.EffectivePort); 1044var allocatedPort = Assert.IsType<int>(svc.Status?.EffectivePort); 1164Assert.Equal(fixedPort, fixedService.Status?.EffectivePort); 1165Assert.Equal(allocatedPort, dynamicService.Status?.EffectivePort); 1206Assert.Equal(allocatedPort, svc.Status?.EffectivePort); 1245Assert.Equal(allocatedPort, svc.Status?.EffectivePort); 1285Assert.Equal(allocatedPort, svc.Status?.EffectivePort); 1319Assert.Equal(allocatedPort, service.Status?.EffectivePort); 1328Assert.Equal(allocatedPort, service.Status?.EffectivePort); 1357Assert.Equal(allocatedPort, service.Status?.EffectivePort); 1366Assert.Equal(allocatedPort, service.Status?.EffectivePort); 1405Assert.Equal(persistedPort, persistentService.Status?.EffectivePort); 1407Assert.Equal(allocatedPort, dynamicService.Status?.EffectivePort); 3395Assert.True(svc.Status?.EffectivePort >= TestKubernetesService.StartOfAutoPortRange); 3440Assert.Equal(desiredPortOne, svc.Status?.EffectivePort); 3473Assert.Equal(desiredPort, svc.Status?.EffectivePort); 3510Assert.Equal(desiredPort, svc.Status?.EffectivePort); 3549Assert.True(svc.Status?.EffectivePort >= TestKubernetesService.StartOfAutoPortRange); 3550Assert.NotEqual(desiredPort, svc.Status?.EffectivePort); 3581Assert.True(svc.Status?.EffectivePort >= TestKubernetesService.StartOfAutoPortRange); 3616Assert.Equal(desiredPort, svc.Status?.EffectivePort); 3699Assert.Equal(desiredPort, svc.Status?.EffectivePort); 3728var allocatedPort = Assert.IsType<int>(svc.Status?.EffectivePort); 3803Assert.Equal(allocatedPort, svc.Status?.EffectivePort); 3850var allocatedPort = Assert.IsType<int>(svc.Status?.EffectivePort); 3883var allocatedPort = Assert.IsType<int>(svc.Status?.EffectivePort); 3930var allocatedPort = Assert.IsType<int>(svc.Status?.EffectivePort); 3972var allocatedPort = Assert.IsType<int>(svc.Status?.EffectivePort); 4040Assert.Equal(desiredPort, svc.Status?.EffectivePort); 4072Assert.Equal(desiredPort, svc.Status?.EffectivePort); 4106Assert.Equal(desiredPort, svc.Status?.EffectivePort);
Dcp\TestKubernetesService.cs (1)
233if (service?.Spec.AddressAllocationMode != AddressAllocationModes.Proxyless || service.Spec.Port is not null || service.Status?.EffectivePort is not null)
DistributedApplicationTests.cs (2)
2361service => service.Status?.EffectivePort is not null, 2370var effectivePort = Assert.IsType<int>(service.Status?.EffectivePort);