pulumi/pkg/resource/deploy/deploytest
Abhinav Gupta e6cc299d86
pkg/deploytest: Don't zero CustomTimeouts < 1 minute
deploytest.ResourceMonitor currently zeroes out any custom timeout value
smaller than 60 seconds because it does integer division on it.
Further, it alawys uses a non-nil CustomTimeouts
even when the input was nil.
This causes undesirable breaks in unit tests that use this type.

This change fixes both issues in CustomTimeouts. Now:

- The RegisterResourceRequest.CustomTimeouts field is non-nil
  only if the input CustomTimeouts was non-nil
- time.Duration and float divison is used to accurately format
  the specified duration as a string
2023-04-14 15:05:51 -07:00
..
analyzer.go [core] Improve engine test coverage. (#8720) 2022-01-11 09:20:43 -08:00
backendclient.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
languageruntime.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
pluginhost.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
provider.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
resourcemonitor.go pkg/deploytest: Don't zero CustomTimeouts < 1 minute 2023-04-14 15:05:51 -07:00
resourcemonitor_test.go pkg/deploytest: Don't zero CustomTimeouts < 1 minute 2023-04-14 15:05:51 -07:00