upgrade to latest java, fix flaky test