@@ -44,6 +44,7 @@ import (
44
44
pb "github.com/dapr/dapr/pkg/api/grpc/proxy/testservice"
45
45
"github.com/dapr/dapr/pkg/config"
46
46
diag "github.com/dapr/dapr/pkg/diagnostics"
47
+ diagConsts "github.com/dapr/dapr/pkg/diagnostics/consts"
47
48
"github.com/dapr/dapr/pkg/resiliency"
48
49
"github.com/dapr/kit/logger"
49
50
"github.com/dapr/kit/retry"
@@ -440,7 +441,7 @@ func (s *proxyTestSuite) TestResiliencyUnary() {
440
441
441
442
ctx , cancel := s .ctx ()
442
443
defer cancel ()
443
- ctx = metadata .NewOutgoingContext (ctx , metadata .Pairs (diag .GRPCProxyAppIDKey , testAppID ))
444
+ ctx = metadata .NewOutgoingContext (ctx , metadata .Pairs (diagConsts .GRPCProxyAppIDKey , testAppID ))
444
445
445
446
// Reset callCount before this test
446
447
s .service .pingCallCount .Store (0 )
@@ -476,7 +477,7 @@ func (s *proxyTestSuite) TestResiliencyUnary() {
476
477
477
478
setupMetrics (s )
478
479
479
- ctx := metadata .NewOutgoingContext (t .Context (), metadata .Pairs (diag .GRPCProxyAppIDKey , testAppID ))
480
+ ctx := metadata .NewOutgoingContext (t .Context (), metadata .Pairs (diagConsts .GRPCProxyAppIDKey , testAppID ))
480
481
481
482
_ , err := s .testClient .Ping (ctx , & pb.PingRequest {Value : message })
482
483
require .Error (t , err , "Ping should fail due to timeouts" )
@@ -515,7 +516,7 @@ func (s *proxyTestSuite) TestResiliencyUnary() {
515
516
go func (i int ) {
516
517
for j := range numOperations {
517
518
pingMsg := fmt .Sprintf ("%d:%d" , i , j )
518
- ctx := metadata .NewOutgoingContext (t .Context (), metadata .Pairs (diag .GRPCProxyAppIDKey , testAppID ))
519
+ ctx := metadata .NewOutgoingContext (t .Context (), metadata .Pairs (diagConsts .GRPCProxyAppIDKey , testAppID ))
519
520
res , err := s .testClient .Ping (ctx , & pb.PingRequest {Value : pingMsg })
520
521
require .NoErrorf (t , err , "Ping should succeed for operation %d:%d" , i , j )
521
522
require .NotNilf (t , res , "Response should not be nil for operation %d:%d" , i , j )
@@ -584,7 +585,7 @@ func (s *proxyTestSuite) TestResiliencyStreaming() {
584
585
ctx , cancel := context .WithTimeout (t .Context (), time .Minute )
585
586
defer cancel ()
586
587
ctx = metadata .NewOutgoingContext (ctx , metadata .Pairs (
587
- diag .GRPCProxyAppIDKey , "test" ,
588
+ diagConsts .GRPCProxyAppIDKey , "test" ,
588
589
"dapr-test" , t .Name (),
589
590
))
590
591
@@ -622,7 +623,7 @@ func (s *proxyTestSuite) TestResiliencyStreaming() {
622
623
setupMetrics (s )
623
624
624
625
ctx = metadata .NewOutgoingContext (ctx , metadata .Pairs (
625
- diag .GRPCProxyAppIDKey , testAppID ,
626
+ diagConsts .GRPCProxyAppIDKey , testAppID ,
626
627
StreamMetadataKey , "1" ,
627
628
"dapr-test" , t .Name (),
628
629
))
@@ -673,7 +674,7 @@ func (s *proxyTestSuite) TestResiliencyStreaming() {
673
674
setupMetrics (s )
674
675
675
676
ctx = metadata .NewOutgoingContext (ctx , metadata .Pairs (
676
- diag .GRPCProxyAppIDKey , testAppID ,
677
+ diagConsts .GRPCProxyAppIDKey , testAppID ,
677
678
StreamMetadataKey , "1" ,
678
679
"dapr-test" , t .Name (),
679
680
))
0 commit comments