Upgrade tests fail with InvocationTargetException

patch by Benedict; reviewed by Mick Semb Wever for CASSANDRA-17050
This commit is contained in:
Benedict Elliott Smith 2021-10-20 14:44:49 +01:00
parent 2e547dfbc4
commit 4884e9b58f
1 changed files with 9 additions and 1 deletions

View File

@ -630,7 +630,15 @@ public class Instance extends IsolatedExecutor implements IInvokableInstance
private static Config loadConfig(IInstanceConfig overrides)
{
Map<String,Object> params = ((InstanceConfig) overrides).getParams();
Map<String,Object> params;
try
{
params = (Map<String, Object>)overrides.getClass().getMethod("getParams").invoke(overrides);
}
catch (Throwable t)
{
throw new RuntimeException(t);
}
boolean check = true;
if (overrides.get(Constants.KEY_DTEST_API_CONFIG_CHECK) != null)
check = (boolean) overrides.get(Constants.KEY_DTEST_API_CONFIG_CHECK);