phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Samarth Jain (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (PHOENIX-4127) Shutdownhook that halts JVM is causing test runs to fail
Date Fri, 25 Aug 2017 17:34:00 GMT

     [ https://issues.apache.org/jira/browse/PHOENIX-4127?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Samarth Jain updated PHOENIX-4127:
----------------------------------
    Attachment: PHOENIX-4127_4.x-HBase-0.98.patch

> Shutdownhook that halts JVM is causing test runs to fail
> --------------------------------------------------------
>
>                 Key: PHOENIX-4127
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-4127
>             Project: Phoenix
>          Issue Type: Bug
>            Reporter: Samarth Jain
>         Attachments: PHOENIX-4127_4.x-HBase-0.98.patch, PHOENIX-4127.patch
>
>
> When all the unit tests actually pass, surefire still reports that there was an error
in the fork. This is because it doesn't like the fact that a forked JVM called system.exit()
or system.halt(). We have a shutdown hook in BaseTest which does that. Such failed runs happen
more frequently on the  4.x-HBase-0.98 branch. And sometimes on the master and 1.1 branch.

> I know the code was added because we were seeing test runs hang. Since we changed a lot
of tests since then, I would like to remove that hook and see if it helps.
> {code}
> private static String checkClusterInitialized(ReadOnlyProps serverProps) throws Exception
{
>         if (!clusterInitialized) {
>             url = setUpTestCluster(config, serverProps);
>             clusterInitialized = true;
>             Runtime.getRuntime().addShutdownHook(new Thread() {
>                 @Override
>                 public void run() {
>                     logger.info("SHUTDOWN: halting JVM now");
>                     Runtime.getRuntime().halt(0);
>                 }
>             });
>         }
>         return url;
>     }
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message