Skip to content

Commit e5f5cd4

Browse files
committed
Adjust expected case of log messages to match changes
1 parent 2e1fc6e commit e5f5cd4

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

src/test/java/oracle/kubernetes/operator/wlsconfig/WlsClusterConfigTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public void verifyValidateClusterStartupWarnsIfNoServersInCluster() throws Excep
6161
try {
6262
handler = TestUtil.setupLogHandler(wlsClusterConfig);
6363
wlsClusterConfig.validateClusterStartup(cs);
64-
assertTrue("Message logged: " + handler.getAllFormattedMessage(), handler.hasWarningMessageWithSubString("No servers configured in weblogic cluster with name cluster1"));
64+
assertTrue("Message logged: " + handler.getAllFormattedMessage(), handler.hasWarningMessageWithSubString("No servers configured in WebLogic cluster with name cluster1"));
6565
} finally {
6666
TestUtil.removeLogHandler(wlsClusterConfig, handler);
6767
}
@@ -76,7 +76,7 @@ public void verifyValidateClusterStartupWarnsIfReplicasTooHigh() throws Exceptio
7676
try {
7777
handler = TestUtil.setupLogHandler(wlsClusterConfig);
7878
wlsClusterConfig.validateClusterStartup(cs);
79-
assertTrue("Message logged: " + handler.getAllFormattedMessage(), handler.hasWarningMessageWithSubString("replicas in clusterStartup for cluster cluster1 is specified with a value of 2 which is larger than the number of configured WLS servers in the cluster: 1"));
79+
assertTrue("Message logged: " + handler.getAllFormattedMessage(), handler.hasWarningMessageWithSubString("Replicas in clusterStartup for cluster cluster1 is specified with a value of 2 which is larger than the number of configured WLS servers in the cluster: 1"));
8080
} finally {
8181
TestUtil.removeLogHandler(wlsClusterConfig, handler);
8282
}

src/test/java/oracle/kubernetes/operator/wlsconfig/WlsDomainConfigTest.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ public void verifyUpdateDomainSpecWarnsIfNoServersInClusterStartupCluster() thro
113113
try {
114114
handler = TestUtil.setupLogHandler(wlsClusterConfig);
115115
wlsDomainConfig.updateDomainSpecAsNeeded(domainSpec);
116-
assertTrue("Message logged: " + handler.getAllFormattedMessage(), handler.hasWarningMessageWithSubString("No servers configured in weblogic cluster with name noSuchCluster"));
116+
assertTrue("Message logged: " + handler.getAllFormattedMessage(), handler.hasWarningMessageWithSubString("No servers configured in WebLogic cluster with name noSuchCluster"));
117117
} finally {
118118
TestUtil.removeLogHandler(wlsClusterConfig, handler);
119119
}
@@ -128,7 +128,7 @@ public void verifyUpdateDomainSpecWarnsIfReplicasTooLarge() throws Exception {
128128
try {
129129
handler = TestUtil.setupLogHandler(wlsClusterConfig);
130130
wlsDomainConfig.updateDomainSpecAsNeeded(domainSpec);
131-
assertTrue("Message logged: " + handler.getAllFormattedMessage(), handler.hasWarningMessageWithSubString("replicas in domainSpec for cluster DockerCluster is specified with a value of 10 which is larger than the number of configured WLS servers in the cluster: 5"));
131+
assertTrue("Message logged: " + handler.getAllFormattedMessage(), handler.hasWarningMessageWithSubString("Replicas in domainSpec for cluster DockerCluster is specified with a value of 10 which is larger than the number of configured WLS servers in the cluster: 5"));
132132
} finally {
133133
TestUtil.removeLogHandler(wlsClusterConfig, handler);
134134
}
@@ -142,7 +142,7 @@ public void verifyUpdateDomainSpecInfoIfReplicasAndZeroClusters() throws Excepti
142142
try {
143143
handler = TestUtil.setupLogHandler(wlsDomainConfig);
144144
wlsDomainConfig.updateDomainSpecAsNeeded(domainSpec);
145-
assertTrue("Message logged: " + handler.getAllFormattedMessage(), handler.hasInfoMessageWithSubString("replicas specified in Domain spec is ignored because there number of configured WLS cluster is not 1."));
145+
assertTrue("Message logged: " + handler.getAllFormattedMessage(), handler.hasInfoMessageWithSubString("Replicas specified in Domain spec is ignored because there number of configured WLS cluster is not 1."));
146146
} finally {
147147
TestUtil.removeLogHandler(wlsDomainConfig, handler);
148148
}
@@ -156,7 +156,7 @@ public void verifyUpdateDomainSpecInfoIfReplicasAndTwoClusters() throws Exceptio
156156
try {
157157
handler = TestUtil.setupLogHandler(wlsDomainConfig);
158158
wlsDomainConfig.updateDomainSpecAsNeeded(domainSpec);
159-
assertTrue("Message logged: " + handler.getAllFormattedMessage(), handler.hasInfoMessageWithSubString("replicas specified in Domain spec is ignored because there number of configured WLS cluster is not 1."));
159+
assertTrue("Message logged: " + handler.getAllFormattedMessage(), handler.hasInfoMessageWithSubString("Replicas specified in Domain spec is ignored because there number of configured WLS cluster is not 1."));
160160
} finally {
161161
TestUtil.removeLogHandler(wlsDomainConfig, handler);
162162
}
@@ -201,7 +201,7 @@ public void verifyUpdateDomainSpecWarnsIfClusterStatupReplicasTooLarge() throws
201201
try {
202202
handler = TestUtil.setupLogHandler(wlsClusterConfig);
203203
wlsDomainConfig.updateDomainSpecAsNeeded(domainSpec);
204-
assertTrue("Message logged: " + handler.getAllFormattedMessage(), handler.hasWarningMessageWithSubString("replicas in clusterStartup for cluster DockerCluster2 is specified with a value of 3 which is larger than the number of configured WLS servers in the cluster: 2"));
204+
assertTrue("Message logged: " + handler.getAllFormattedMessage(), handler.hasWarningMessageWithSubString("Replicas in clusterStartup for cluster DockerCluster2 is specified with a value of 3 which is larger than the number of configured WLS servers in the cluster: 2"));
205205
} finally {
206206
TestUtil.removeLogHandler(wlsClusterConfig, handler);
207207
}
@@ -218,8 +218,8 @@ public void verifyUpdateDomainSpecWarnsIfClusterStatupReplicasTooLarge_2clusters
218218
try {
219219
handler = TestUtil.setupLogHandler(wlsClusterConfig);
220220
wlsDomainConfig.updateDomainSpecAsNeeded(domainSpec);
221-
assertTrue("Message logged: " + handler.getAllFormattedMessage(), handler.hasWarningMessageWithSubString("replicas in clusterStartup for cluster DockerCluster is specified with a value of 10 which is larger than the number of configured WLS servers in the cluster: 3"));
222-
assertTrue("Message logged: " + handler.getAllFormattedMessage(), handler.hasWarningMessageWithSubString("replicas in clusterStartup for cluster DockerCluster2 is specified with a value of 10 which is larger than the number of configured WLS servers in the cluster: 2"));
221+
assertTrue("Message logged: " + handler.getAllFormattedMessage(), handler.hasWarningMessageWithSubString("Replicas in clusterStartup for cluster DockerCluster is specified with a value of 10 which is larger than the number of configured WLS servers in the cluster: 3"));
222+
assertTrue("Message logged: " + handler.getAllFormattedMessage(), handler.hasWarningMessageWithSubString("Replicas in clusterStartup for cluster DockerCluster2 is specified with a value of 10 which is larger than the number of configured WLS servers in the cluster: 2"));
223223
} finally {
224224
TestUtil.removeLogHandler(wlsClusterConfig, handler);
225225
}

0 commit comments

Comments
 (0)