Skip to content
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

Remaining feature files count always shown as 0 in 1.4.1 #2432

Closed
rc2201 opened this issue Nov 3, 2023 · 6 comments
Closed

Remaining feature files count always shown as 0 in 1.4.1 #2432

rc2201 opened this issue Nov 3, 2023 · 6 comments
Assignees
Milestone

Comments

@rc2201
Copy link

rc2201 commented Nov 3, 2023

During the execution, the number of remaining feature files to be executed is always showing as 0 on console logs in release 1.4.1
I compared it with release 1.4.0 and it is working fine in that release.

PFA screenshot using both versions highlighting the issue.

karate 1 4 1 remaining features

karate 1 4 0 remaining features

@rc2201
Copy link
Author

rc2201 commented Nov 15, 2023

@ptrthomas
Update- This is happening when using -Dkarate.options

@ptrthomas
Copy link
Member

most likely related to #2444

@dvargas46
Copy link
Contributor

Looks like this issue may have actually been around for a while, but #2444 made it more apparent. It happens whenever the runner is configured to use 1 thread. In this case, it uses the SyncExecutorService for running scenarios, which is implemented to run everything in the main caller thread upon submitting the runtime. So every time it checks the list of remaining uncompleted runtimes, it already completed the last, giving 0 as the result.

@ptrthomas
Copy link
Member

@dvargas46 really appreciate the analysis, perhaps we just skip printing that when thread count is 1

@dvargas46
Copy link
Contributor

@ptrthomas yes, that would work. I was also thinking a way to fix it while retaining the current behavior could be to load the futures list first before submitting it all to the executor.

Either way should be fairly straight forward to implement. I can try it out and create a PR if that works.

@ptrthomas
Copy link
Member

yes please go ahead @dvargas46

dvargas46 added a commit to dvargas46/karate that referenced this issue Feb 21, 2024
dvargas46 added a commit to dvargas46/karate that referenced this issue Feb 23, 2024
@ptrthomas ptrthomas added this to the 1.5.0 milestone Feb 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants