@@ -121,14 +121,14 @@ public void testThatEnterpriseLicenseMayNotHaveMaxNodes() throws Exception {
121121 .maxNodes (randomIntBetween (1 , 50 ))
122122 .maxResourceUnits (randomIntBetween (10 , 500 ));
123123 final IllegalStateException ex = expectThrows (IllegalStateException .class , builder ::build );
124- assertThat (ex , TestMatchers .throwableWithMessage ("maxNodes may not be set for enterprise licenses" ));
124+ assertThat (ex , TestMatchers .throwableWithMessage ("maxNodes may not be set for enterprise licenses (type=[enterprise]) " ));
125125 }
126126
127127 public void testThatEnterpriseLicenseMustHaveMaxResourceUnits () throws Exception {
128128 License .Builder builder = randomLicense (License .LicenseType .ENTERPRISE )
129129 .maxResourceUnits (-1 );
130130 final IllegalStateException ex = expectThrows (IllegalStateException .class , builder ::build );
131- assertThat (ex , TestMatchers .throwableWithMessage ("maxResourceUnits must be set for enterprise licenses" ));
131+ assertThat (ex , TestMatchers .throwableWithMessage ("maxResourceUnits must be set for enterprise licenses (type=[enterprise]) " ));
132132 }
133133
134134 public void testThatRegularLicensesMustHaveMaxNodes () throws Exception {
@@ -145,7 +145,8 @@ public void testThatRegularLicensesMayNotHaveMaxResourceUnits() throws Exception
145145 .maxResourceUnits (randomIntBetween (10 , 500 ))
146146 .maxNodes (randomIntBetween (1 , 50 ));
147147 final IllegalStateException ex = expectThrows (IllegalStateException .class , builder ::build );
148- assertThat (ex , TestMatchers .throwableWithMessage ("maxResourceUnits may only be set for enterprise licenses" ));
148+ assertThat (ex , TestMatchers .throwableWithMessage ("maxResourceUnits may only be set for enterprise licenses (not permitted " +
149+ "for type=[" + type .getTypeName () + "])" ));
149150 }
150151
151152 public void testLicenseToAndFromXContentForEveryLicenseType () throws Exception {
0 commit comments