Skip to content

[#289] Flag to tag timeouts as permanent failure#290

Open
yevgenys wants to merge 1 commit intoRestComm:masterfrom
yevgenys:289_flag_to_tag_timeouts_as_permanent_failure
Open

[#289] Flag to tag timeouts as permanent failure#290
yevgenys wants to merge 1 commit intoRestComm:masterfrom
yevgenys:289_flag_to_tag_timeouts_as_permanent_failure

Conversation

@yevgenys
Copy link

refactored SMSCShellExecutor:removed duplicates for CLI get command;
added new option to CLI get command;
added tests for CLI get command;
added new flag 'markTimeoutAsPermanentFailure' to SmscPropertiesManagement;
added functionality for new flag;
Fixes #289

reduced code in ShellExecutor;
added discovery of new getters via reflection:
no need to add manual call of getter method, getter will be discovered automatically

    private void initSmscPropertiesManagementGetters() {
        smscPropertiesManagementGetters = new HashMap<>();
        Class c = smscPropertiesManagement.getClass();
        for (Method method : c.getMethods()) {
            String methodName = method.getName();
            if (methodName.startsWith("get")) {
                smscPropertiesManagementGetters.put(methodName.substring(3).toLowerCase(), method);
            } else if (methodName.startsWith("is")) {
                smscPropertiesManagementGetters.put(methodName.substring(2).toLowerCase(), method);
            }
        }
    }

then just call function
addProperty(sb, "${getterNameWithout_get|is}");

…mmand;

added new option to CLI get command;
added tests for CLI get command;
added new flag 'markTimeoutAsPermanentFailure' to SmscPropertiesManagement;
added functionality for new flag;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant