File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
sdk-tests/src/test/java/io/dapr/it/testcontainers Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 43
43
classes = {
44
44
TestActorsApplication .class ,
45
45
TestDaprActorsConfiguration .class
46
+ },
47
+ properties = {
48
+ "server.port=64080" , // must be constant, not a static attribute from class below.
46
49
}
47
50
)
48
51
@ Testcontainers
49
52
@ Tag ("testcontainers" )
50
53
public class DaprActorsIT {
54
+
55
+ private static final int APP_PORT = 64080 ;
56
+
51
57
private static final Network DAPR_NETWORK = Network .newNetwork ();
52
58
53
59
private static final String ACTORS_MESSAGE_PATTERN = ".*Actor API level in the cluster has been updated to 10.*" ;
@@ -61,7 +67,7 @@ public class DaprActorsIT {
61
67
.withDaprLogLevel (DaprLogLevel .DEBUG )
62
68
.withLogConsumer (outputFrame -> System .out .println (outputFrame .getUtf8String ()))
63
69
.withAppChannelAddress ("host.testcontainers.internal" )
64
- .withAppPort (8080 );
70
+ .withAppPort (APP_PORT );
65
71
66
72
/**
67
73
* Expose the Dapr ports to the host.
@@ -82,7 +88,7 @@ static void daprProperties(DynamicPropertyRegistry registry) {
82
88
83
89
@ BeforeEach
84
90
public void setUp (){
85
- org .testcontainers .Testcontainers .exposeHostPorts (8080 );
91
+ org .testcontainers .Testcontainers .exposeHostPorts (APP_PORT );
86
92
daprActorRuntime .registerActor (TestActorImpl .class );
87
93
// Ensure the subscriptions are registered
88
94
Wait .forLogMessage (ACTORS_MESSAGE_PATTERN , 1 ).waitUntilReady (DAPR_CONTAINER );
You can’t perform that action at this time.
0 commit comments