Skip to content

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

Closed
@EgorkaKulikov

Description

@EgorkaKulikov

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:

Metadata

Metadata

Labels

comp-summariesSomething related to the method names, code comments and display names generationctg-bugIssue is a bug

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions