Merge pull request #21069 from wojtek-t/fix_namespace_test_issues
Fix framework afterEach method
This commit is contained in:
		| @@ -135,11 +135,6 @@ func (f *Framework) afterEach() { | |||||||
| 		dumpAllNodeInfo(f.Client) | 		dumpAllNodeInfo(f.Client) | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	// Check whether all nodes are ready after the test. |  | ||||||
| 	if err := allNodesReady(f.Client, time.Minute); err != nil { |  | ||||||
| 		Failf("All nodes should be ready after test, %v", err) |  | ||||||
| 	} |  | ||||||
|  |  | ||||||
| 	summaries := make([]TestDataSummary, 0) | 	summaries := make([]TestDataSummary, 0) | ||||||
| 	if testContext.GatherKubeSystemResourceUsageData { | 	if testContext.GatherKubeSystemResourceUsageData { | ||||||
| 		summaries = append(summaries, f.gatherer.stopAndSummarize([]int{90, 99}, f.addonResourceConstraints)) | 		summaries = append(summaries, f.gatherer.stopAndSummarize([]int{90, 99}, f.addonResourceConstraints)) | ||||||
| @@ -198,6 +193,13 @@ func (f *Framework) afterEach() { | |||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
|  | 	// Check whether all nodes are ready after the test. | ||||||
|  | 	// This is explicitly done at the very end of the test, to avoid | ||||||
|  | 	// e.g. not removing namespace in case of this failure. | ||||||
|  | 	if err := allNodesReady(f.Client, time.Minute); err != nil { | ||||||
|  | 		Failf("All nodes should be ready after test, %v", err) | ||||||
|  | 	} | ||||||
|  |  | ||||||
| 	// Paranoia-- prevent reuse! | 	// Paranoia-- prevent reuse! | ||||||
| 	f.Namespace = nil | 	f.Namespace = nil | ||||||
| 	f.Client = nil | 	f.Client = nil | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Wojciech Tyczynski
					Wojciech Tyczynski