On Wed, 26 Jan 2022 00:12:17 GMT, Harshitha Onkar <d...@openjdk.java.net> wrote:
> A new test case was added to test the fix as there was no corresponding test > case present for this issue previously. Changes requested by psadhukhan (Reviewer). test/jdk/javax/swing/JTableHeader/8016524/Bug8016524.java line 26: > 24: /* > 25: @test > 26: @bug 8016524 we normally align the jtreg tags using "*" same as the copyright header.. test/jdk/javax/swing/JTableHeader/8016524/Bug8016524.java line 42: > 40: import javax.swing.table.JTableHeader; > 41: > 42: public class Bug8016524 { we normally use descriptive test name not bugid in testname anymore.. You can see other regression test in javax/swing test folder test/jdk/javax/swing/JTableHeader/8016524/Bug8016524.java line 66: > 64: final int header_dim[] = new int[2]; > 65: Robot robot = new Robot(); > 66: robot.setAutoDelay(20); We normally set autodelay value to 100 test/jdk/javax/swing/JTableHeader/8016524/Bug8016524.java line 105: > 103: // if pixel color is white then border not visible, throw > Exception > 104: if(lowerLeft.getRGB() == WHITE_RGB || lowerRight.getRGB() == > WHITE_RGB) > 105: { as per coding style, the { should be at the same line test/jdk/javax/swing/JTableHeader/8016524/Bug8016524.java line 106: > 104: if(lowerLeft.getRGB() == WHITE_RGB || lowerRight.getRGB() == > WHITE_RGB) > 105: { > 106: throw new RuntimeException("JTableHeader Bottom Border not > visible"); Not sure this check is correct. If we have dark theme or the background is changed in system, then I guess the test will fail even with fix. Maybe you can set the JTable background to white explicitly. test/jdk/javax/swing/JTableHeader/8016524/Bug8016524.java line 111: > 109: Thread.sleep(1000); > 110: } catch (InterruptedException e) > 111: { please rectify { style as above test/jdk/javax/swing/JTableHeader/8016524/Bug8016524.java line 114: > 112: throw new RuntimeException(e); > 113: } > 114: frame.dispose(); frame should be disposed irrespective of whether it fails or pass. Also, it should be under EDT too. ------------- PR: https://git.openjdk.java.net/jdk/pull/7219