Skip to content

Remove possibility to specify custom timeout message #2291

Closed

Description

@pekkaklarck

Currently it is possible to specify a custom message for test and keyword timeouts:

*** Keywords ***
Example
    [Timeout]    2 min    My message
    Sleep    5 s

I propose we remove this functionality for the following reasons:

  1. I don't see any use cases where the custom error message would be better than the default message. For example, the above keyword would fail with Keyword timeout 2 seconds exceeded. if it wouldn't have a custom message.

  2. As Timeout custom message needs to also indicate that it was a timeout event #2288 illustrates, custom timeouts can make it a lot harder to understand why a keyword has failed. This is especially problematic if there just are extra spaces in the timeout itself:

    *** Keywords ***
    Example
        [Timeout]    2    min
        Sleep    5 s

    In the above example the actual timeout value would be 2 seconds and the message would be very confusing min. As originally proposed in Timeout custom message needs to also indicate that it was a timeout event #2288, this could be fixed also by adding the actual timeout value to the custom message, but I think it would be better to just remove the support for custom messages altogether.

  3. Not having custom timeout messages would simplify Robot's internal timeout handling a little. Currently executable model objects have timeout as an object that has value and message, but result model objects only have timeout as a string containing the value. The possible custom message isn't actually even stored in output.xml at all.

Please comment this issue if you have valid use cases for custom timeout messages and don't want them to be removed. Because removing them is backwards incompatible, it can be done earliest in RF 3.1, but we can deprecate them already in RF 3.0.1.

Activity

  1. added this to the milestone on Jan 8, 2016
  2. pekkaklarck commented on Feb 24, 2016

    @pekkaklarck
    MemberAuthor

    Nobody has objected removing the support for custom timeout messages here nor on robotframework-users where I asked about it on Jan 8, 2016. It seems pretty clear that we can remove this functionality in RF 3.1 and deprecate it in RF 3.0.1.

  3. changed the title [-]Remove possibility so specify custom timeout message[/-] [+]Remove possibility to specify custom timeout message[/+] on Apr 23, 2018
  4. modified the milestones: v3.1, v.3.2 on Jul 5, 2018
  5. pekkaklarck commented on Jul 5, 2018

    @pekkaklarck
    MemberAuthor

    Decided to change removing the custom message to RF 3.2 to let it be deprecated for a full major release cycle. This functionality is still deprecated and should not be used.

  6. added 3 commits that reference this issue on Jun 6, 2019
    acdae62
    e128b8b
    9ecce3c
  7. added a commit that references this issue on Jun 19, 2019
    1afa6f0
  8. added a commit that references this issue on Aug 12, 2019
    dd21e7e
  9. added a commit that references this issue on Aug 20, 2019
    14ad305
  10. added 2 commits that reference this issue on Sep 3, 2019
    4788d21
    2d0b593
  11. pekkaklarck commented on Oct 31, 2019

    @pekkaklarck
    MemberAuthor

    Issue #3357 noted that RF 3.1.2 User Guide still talks about the custom message and it seems we haven't updated the UG after that either. That should be done as part of this issue so I'll reopen this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions