mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-13 18:10:59 +00:00
Merge pull request #2040 from mortent/FixFlakyWaitTest
Print the initial unknown status for all resources before looking at events
This commit is contained in:
@@ -138,10 +138,10 @@ func (s *TablePrinter) Print() {
|
|||||||
|
|
||||||
func (s *TablePrinter) PrintUntil(stop <-chan struct{}, interval time.Duration) <-chan struct{} {
|
func (s *TablePrinter) PrintUntil(stop <-chan struct{}, interval time.Duration) <-chan struct{} {
|
||||||
completed := make(chan struct{})
|
completed := make(chan struct{})
|
||||||
|
setColor(s.out, WHITE)
|
||||||
|
s.printTable(s.statusInfo.CurrentStatus(), false)
|
||||||
go func() {
|
go func() {
|
||||||
defer close(completed)
|
defer close(completed)
|
||||||
setColor(s.out, WHITE)
|
|
||||||
s.printTable(s.statusInfo.CurrentStatus(), false)
|
|
||||||
ticker := time.NewTicker(interval)
|
ticker := time.NewTicker(interval)
|
||||||
for {
|
for {
|
||||||
select {
|
select {
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ func TestWaitNoResources(t *testing.T) {
|
|||||||
|
|
||||||
aggStatuses := tableOutput.allAggStatuses()
|
aggStatuses := tableOutput.allAggStatuses()
|
||||||
expectedAggStatuses := []status.Status{
|
expectedAggStatuses := []status.Status{
|
||||||
status.CurrentStatus,
|
status.UnknownStatus,
|
||||||
status.CurrentStatus,
|
status.CurrentStatus,
|
||||||
}
|
}
|
||||||
if !reflect.DeepEqual(aggStatuses, expectedAggStatuses) {
|
if !reflect.DeepEqual(aggStatuses, expectedAggStatuses) {
|
||||||
|
|||||||
Reference in New Issue
Block a user