Skip to content

Commit

Permalink
Quieten test: only show output on failure
Browse files Browse the repository at this point in the history
Most JVMs should behave OK now...
  • Loading branch information
sebbASF committed Dec 22, 2024
1 parent 78a9ebc commit e28be4f
Showing 1 changed file with 20 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -491,27 +491,28 @@ public void testInvalidDomains() {
// Check if IDN.toASCII is broken or not
@Test
public void testIsIDNtoASCIIBroken() {
System.out.println(">>DomainValidatorTest.testIsIDNtoASCIIBroken()");
final String input = ".";
final boolean ok = input.equals(IDN.toASCII(input));
System.out.println("IDN.toASCII is " + (ok ? "OK" : "BROKEN"));
final String[] props = { "java.version", // Java Runtime Environment version
"java.vendor", // Java Runtime Environment vendor
"java.vm.specification.version", // Java Virtual Machine specification version
"java.vm.specification.vendor", // Java Virtual Machine specification vendor
"java.vm.specification.name", // Java Virtual Machine specification name
"java.vm.version", // Java Virtual Machine implementation version
"java.vm.vendor", // Java Virtual Machine implementation vendor
"java.vm.name", // Java Virtual Machine implementation name
"java.specification.version", // Java Runtime Environment specification version
"java.specification.vendor", // Java Runtime Environment specification vendor
"java.specification.name", // Java Runtime Environment specification name
"java.class.version", // Java class format version number
};
for (final String t : props) {
System.out.println(t + "=" + System.getProperty(t));
if (!input.equals(IDN.toASCII(input))) {
System.out.println(">>DomainValidatorTest.testIsIDNtoASCIIBroken()");
System.out.println("IDN.toASCII is BROKEN");
final String[] props = { "java.version", // Java Runtime Environment version
"java.vendor", // Java Runtime Environment vendor
"java.vm.specification.version", // Java Virtual Machine specification version
"java.vm.specification.vendor", // Java Virtual Machine specification vendor
"java.vm.specification.name", // Java Virtual Machine specification name
"java.vm.version", // Java Virtual Machine implementation version
"java.vm.vendor", // Java Virtual Machine implementation vendor
"java.vm.name", // Java Virtual Machine implementation name
"java.specification.version", // Java Runtime Environment specification version
"java.specification.vendor", // Java Runtime Environment specification vendor
"java.specification.name", // Java Runtime Environment specification name
"java.class.version", // Java class format version number
};
for (final String t : props) {
System.out.println(t + "=" + System.getProperty(t));
}
System.out.println("<<DomainValidatorTest.testIsIDNtoASCIIBroken()");
}
System.out.println("<<DomainValidatorTest.testIsIDNtoASCIIBroken()");
assertTrue(true); // dummy assertion to satisfy lint
}

Expand Down

0 comments on commit e28be4f

Please sign in to comment.