Skip to content

have_one_new_sample raises timeout failure when executed in a loop #244

@gustavoneves12

Description

@gustavoneves12

The method have_one_new_sample is raising a timeout failure when expect_execution is executed in a loop as shown in the code below:

samples.each |sample| do
    actual = expect_execution { syskit_write task.in_port, sample}
             .to { have_one_new_sample task.out_port }
end

It seems some samples have been lost. In my tests cases, samples have 120 elements. To make it works, I created a reader out of the expect_execution.to block as in the code below:

reader = syskit_create_reader task.out_port
samples.each |sample| do
    actual = expect_execution { syskit_write task.in_port, sample}
             .to { have_one_new_sample reader }
end

Did I do something wrong?
Why the first code did not work and the second one works?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions