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

vcsim: Fix -method-delay option to update task states #3324

Merged
merged 1 commit into from
Jan 8, 2024

Conversation

Syuparn
Copy link
Contributor

@Syuparn Syuparn commented Jan 4, 2024

Description

This PR fixes -method-delay option to delay task state updates

Closes: #3323

Type of change

Please mark options that are relevant:

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to
    not work as expected)
  • This change requires a documentation update
  • Build related change

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide
instructions so we can reproduce. If applicable, please also list any relevant
details for your test configuration.

  • run vcsim manually to check task state updates
# delay PowerOff for 10 seconds
$ vcsim -method-delay "PowerOff:10000"

# create PowerOff task
$ govc vm.power -off -force DC0_H0_VM0
Powering off VirtualMachine:vm-55... OK

# get the task
$ govc tasks | grep PowerOff
PowerOff                                 vm-55                          vcsim                           12:26:39  12:26:39         - running [ 0% Task:task-66]
# 10 seconds later
$ govc tasks | grep PowerOff
PowerOff                                 vm-55                          vcsim                           12:26:39  12:26:39  12:26:49 success [10.0020702s]

Checklist:

  • My code follows the CONTRIBUTION guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged

Closes: vmware#3323
Signed-off-by: syuparn <s.hello.spagetti@gmail.com>
Copy link
Member

@dougm dougm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Syuparn

@dougm dougm merged commit 00bc2f8 into vmware:main Jan 8, 2024
10 of 11 checks passed
@Syuparn Syuparn deleted the issue-3323 branch January 8, 2024 07:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] vcsim: -method-delay does not work
2 participants