question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

WaitConditionBuilder constructor never sets the condition in the builder despite taking it as an argument

See original GitHub issue

Citrus Version 3.2.1

Expected behavior The constructor should set the condition in the underlying builder.

Actual behavior The constructor does not set the condition in the underlying builder, it has to be set manually.

Test case sample

Wait.Builder builder = new Wait.Builder()
        .time(timeout);
WaitActionConditionBuilder waitActionConditionBuilder = new WaitActionConditionBuilder(condition, builder);

does not work. The condition will never actually be set. Instead,

Wait.Builder builder = new Wait.Builder()
        .time(timeout)
        .condition(condition);

WaitActionConditionBuilder waitActionConditionBuilder = new WaitActionConditionBuilder(condition, waitBuilder);

has to be performed. This makes the argument condition in the WaitActionConditionBuilder useless. I’d propose to add a line builder.condition(condition) in the constructor of WaitConditionBuilder.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:12 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
bborttcommented, Jul 21, 2022

@akuz0 just follow the steps proposed. make the constructor argument meaningful. test it using the code proposed (“assert condition is applied in constructor”).

0reactions
christophdcommented, Jul 27, 2022

@bbortt @akuz0 please have a look #875

Read more comments on GitHub >

github_iconTop Results From Across the Web

Good First Issue on Twitter: "an issue just got labeled ...
WaitConditionBuilder constructor never sets the condition in the builder despite ... The constructor should set the condition in the underlying builder.
Read more >
Why is Lombok @Builder not compatible with this constructor?
@wdc I have only one constructors (which is mentioned in the code). I need constructor with this parameter to be able to copy...
Read more >
Constructor with tons of parameters vs builder pattern
The Builder Pattern does not solve the “problem” of many arguments. But why are many arguments problematic? They indicate your class might ...
Read more >
Item 2: Consider a builder when faced with many constructor ...
When you want to create an instance, you use the constructor with the shortest parameter list containing all the parameters you want to...
Read more >
Framework for automated integration tests with focus on ...
WaitConditionBuilder constructor never sets the condition in the builder despite taking it as an argument ; Citrus Version 3.2.1 ; Expected ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found