8282import io .grpc .inprocess .InProcessServerBuilder ;
8383import io .grpc .internal .FakeClock ;
8484import io .grpc .internal .GrpcUtil ;
85- import io .grpc .internal .XdsCommonAttributes ;
85+ import io .grpc .xds . internal .XdsInternalAttributes ;
8686import io .grpc .testing .GrpcCleanupRule ;
8787import io .grpc .util .GracefulSwitchLoadBalancer ;
8888import io .grpc .util .GracefulSwitchLoadBalancerAccessor ;
@@ -308,15 +308,15 @@ public void edsClustersWithRingHashEndpointLbPolicy() throws Exception {
308308 // LOCALITY1 are equally weighted.
309309 assertThat (addr1 .getAddresses ())
310310 .isEqualTo (Arrays .asList (newInetSocketAddress ("127.0.0.1" , 8080 )));
311- assertThat (addr1 .getAttributes ().get (XdsAttributes .ATTR_SERVER_WEIGHT ))
311+ assertThat (addr1 .getAttributes ().get (io . grpc . xds . XdsAttributes .ATTR_SERVER_WEIGHT ))
312312 .isEqualTo (10 );
313313 assertThat (addr2 .getAddresses ())
314314 .isEqualTo (Arrays .asList (newInetSocketAddress ("127.0.0.2" , 8080 )));
315- assertThat (addr2 .getAttributes ().get (XdsAttributes .ATTR_SERVER_WEIGHT ))
315+ assertThat (addr2 .getAttributes ().get (io . grpc . xds . XdsAttributes .ATTR_SERVER_WEIGHT ))
316316 .isEqualTo (10 );
317317 assertThat (addr3 .getAddresses ())
318318 .isEqualTo (Arrays .asList (newInetSocketAddress ("127.0.1.1" , 8080 )));
319- assertThat (addr3 .getAttributes ().get (XdsAttributes .ATTR_SERVER_WEIGHT ))
319+ assertThat (addr3 .getAttributes ().get (io . grpc . xds . XdsAttributes .ATTR_SERVER_WEIGHT ))
320320 .isEqualTo (50 * 60 );
321321 assertThat (childBalancer .name ).isEqualTo (PRIORITY_POLICY_NAME );
322322 PriorityLbConfig priorityLbConfig = (PriorityLbConfig ) childBalancer .config ;
@@ -383,7 +383,7 @@ public void edsClustersWithLeastRequestEndpointLbPolicy() {
383383
384384 assertThat (
385385 childBalancer .addresses .get (0 ).getAttributes ()
386- .get (XdsAttributes .ATTR_LOCALITY_WEIGHT )).isEqualTo (100 );
386+ .get (io . grpc . xds . XdsAttributes .ATTR_LOCALITY_WEIGHT )).isEqualTo (100 );
387387 }
388388
389389 @ Test
@@ -409,7 +409,7 @@ public void edsClustersEndpointHostname_addedToAddressAttribute() {
409409
410410 assertThat (
411411 childBalancer .addresses .get (0 ).getAttributes ()
412- .get (XdsCommonAttributes .ATTR_ADDRESS_NAME )).isEqualTo ("hostname1" );
412+ .get (XdsInternalAttributes .ATTR_ADDRESS_NAME )).isEqualTo ("hostname1" );
413413 }
414414
415415 @ Test
@@ -581,12 +581,12 @@ public void onlyEdsClusters_receivedEndpoints() {
581581 io .grpc .xds .client .Locality locality2 = io .grpc .xds .client .Locality .create (
582582 LOCALITY2 .getRegion (), LOCALITY2 .getZone (), LOCALITY2 .getSubZone ());
583583 for (EquivalentAddressGroup eag : childBalancer .addresses ) {
584- io .grpc .xds .client .Locality locality = eag .getAttributes ().get (XdsAttributes .ATTR_LOCALITY );
584+ io .grpc .xds .client .Locality locality = eag .getAttributes ().get (io . grpc . xds . XdsAttributes .ATTR_LOCALITY );
585585 if (locality .equals (locality1 )) {
586- assertThat (eag .getAttributes ().get (XdsAttributes .ATTR_LOCALITY_WEIGHT ))
586+ assertThat (eag .getAttributes ().get (io . grpc . xds . XdsAttributes .ATTR_LOCALITY_WEIGHT ))
587587 .isEqualTo (70 );
588588 } else if (locality .equals (locality2 )) {
589- assertThat (eag .getAttributes ().get (XdsAttributes .ATTR_LOCALITY_WEIGHT ))
589+ assertThat (eag .getAttributes ().get (io . grpc . xds . XdsAttributes .ATTR_LOCALITY_WEIGHT ))
590590 .isEqualTo (30 );
591591 } else {
592592 throw new AssertionError ("Unexpected locality region: " + locality .region ());
@@ -814,7 +814,7 @@ public void handleEdsResource_ignoreLocalitiesWithNoHealthyEndpoints() {
814814 io .grpc .xds .client .Locality locality2 = io .grpc .xds .client .Locality .create (
815815 LOCALITY2 .getRegion (), LOCALITY2 .getZone (), LOCALITY2 .getSubZone ());
816816 for (EquivalentAddressGroup eag : childBalancer .addresses ) {
817- assertThat (eag .getAttributes ().get (XdsAttributes .ATTR_LOCALITY )).isEqualTo (locality2 );
817+ assertThat (eag .getAttributes ().get (io . grpc . xds . XdsAttributes .ATTR_LOCALITY )).isEqualTo (locality2 );
818818 }
819819 }
820820
@@ -898,7 +898,7 @@ public void onlyLogicalDnsCluster_endpointsResolved() {
898898 newInetSocketAddress ("127.0.2.1" , 9000 ), newInetSocketAddress ("127.0.2.2" , 9000 )))),
899899 childBalancer .addresses );
900900 assertThat (childBalancer .addresses .get (0 ).getAttributes ()
901- .get (XdsCommonAttributes .ATTR_ADDRESS_NAME )).isEqualTo (DNS_HOST_NAME + ":9000" );
901+ .get (XdsInternalAttributes .ATTR_ADDRESS_NAME )).isEqualTo (DNS_HOST_NAME + ":9000" );
902902 }
903903
904904 @ Test
@@ -1055,8 +1055,8 @@ private void startXdsDepManager(final CdsConfig cdsConfig, boolean forwardTime)
10551055 loadBalancer .acceptResolvedAddresses (ResolvedAddresses .newBuilder ()
10561056 .setAddresses (Collections .emptyList ())
10571057 .setAttributes (Attributes .newBuilder ()
1058- .set (XdsAttributes .XDS_CONFIG , xdsConfig .getValue ())
1059- .set (XdsAttributes .XDS_CLUSTER_SUBSCRIPT_REGISTRY , xdsDepManager )
1058+ .set (io . grpc . xds . XdsAttributes .XDS_CONFIG , xdsConfig .getValue ())
1059+ .set (io . grpc . xds . XdsAttributes .XDS_CLUSTER_SUBSCRIPT_REGISTRY , xdsDepManager )
10601060 .build ())
10611061 .setLoadBalancingPolicyConfig (cdsConfig )
10621062 .build ());
0 commit comments