Skip to content

Timeout exception (internal of UtBot) is dispayed in Summaries #1832

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
EgorkaKulikov opened this issue Feb 21, 2023 · 1 comment · Fixed by #1865
Closed

Timeout exception (internal of UtBot) is dispayed in Summaries #1832

EgorkaKulikov opened this issue Feb 21, 2023 · 1 comment · Fixed by #1865
Assignees
Labels
comp-summaries Something related to the method names, code comments and display names generation ctg-bug Issue is a bug

Comments

@EgorkaKulikov
Copy link
Collaborator

EgorkaKulikov commented Feb 21, 2023

Description

Timeout exception (internal of UtBot) is added to Java docs.
Tag @utbot.throwsException should be used for exceptions from user code only.

To Reproduce

Generate tests for the following code:

public class A {

    public int hangForSeconds(int seconds) {
        for (int i = 0; i < seconds; i++) {
                Thread.sleep(1000);
        }
        return seconds;
    }
}

Visual proofs (screenshots, logs, images)

image

For example, the following summaries are generated:

    /**
     * @utbot.classUnderTest {@link OrderService}
     * @utbot.methodUnderTest {@link OrderService#getOrders()}
     * @utbot.invokes {@link OrderRepository#findAll()}
     * @utbot.returnsFrom {@code return orderRepository.findAll();}
     * @utbot.throwsException {@link org.utbot.framework.plugin.api.TimeoutException} in: return orderRepository.findAll();
     */

The last line is erroneous. We should not see utbot exceptions in summaries.

Additional context

Previously fixed bug with similar error:

Connected feature request:

@EgorkaKulikov EgorkaKulikov added ctg-bug Issue is a bug comp-summaries Something related to the method names, code comments and display names generation labels Feb 21, 2023
@EgorkaKulikov EgorkaKulikov self-assigned this Feb 21, 2023
@sofurihafe
Copy link
Member

Could you please supply the issue with a code sample?

@EgorkaKulikov EgorkaKulikov linked a pull request Feb 27, 2023 that will close this issue
6 tasks
@github-project-automation github-project-automation bot moved this from Todo to Done in UTBot Java Feb 27, 2023
@EgorkaKulikov EgorkaKulikov reopened this Feb 27, 2023
@github-project-automation github-project-automation bot moved this from Done to In Progress in UTBot Java Feb 27, 2023
@EgorkaKulikov EgorkaKulikov removed a link to a pull request Feb 27, 2023
6 tasks
sofurihafe added a commit that referenced this issue Feb 27, 2023
@github-project-automation github-project-automation bot moved this from In Progress to Done in UTBot Java Feb 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp-summaries Something related to the method names, code comments and display names generation ctg-bug Issue is a bug
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants