mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2025-02-25 18:55:28 -06:00
nosqlbench-968 Scenario shutdown hook not being unregistered correctly
This commit is contained in:
parent
844ce1c0d8
commit
5a648671d3
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2022 nosqlbench
|
* Copyright (c) 2022-2023 nosqlbench
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@ -277,8 +277,10 @@ public class Scenario implements Callable<ExecutionMetricsResult> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Runtime.getRuntime().removeShutdownHook(scenarioShutdownHook);
|
Runtime.getRuntime().removeShutdownHook(scenarioShutdownHook);
|
||||||
scenarioShutdownHook.run();
|
var runHook = scenarioShutdownHook;
|
||||||
scenarioShutdownHook = null;
|
scenarioShutdownHook = null;
|
||||||
|
runHook.run();
|
||||||
|
logger.debug("removing scenario shutdown hook");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void notifyException(Thread t, Throwable e) {
|
public void notifyException(Thread t, Throwable e) {
|
||||||
|
Loading…
Reference in New Issue
Block a user