You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@yunikorn.apache.org by GitBox <gi...@apache.org> on 2022/05/17 11:05:44 UTC

[GitHub] [yunikorn-core] pbacsko commented on a diff in pull request #408: [YUNIKORN-1129]cleanup yunikorn-state.txt file in tests

pbacsko commented on code in PR #408:
URL: https://github.com/apache/yunikorn-core/pull/408#discussion_r874679015


##########
pkg/common/configs/config_test.go:
##########
@@ -659,6 +659,8 @@ partitions:
 	stateDumpFilePath := "yunikorn-state.txt"
 	assert.Equal(t, conf.Partitions[0].StateDumpFilePath, stateDumpFilePath)
 	assert.Equal(t, conf.Partitions[1].StateDumpFilePath, "")
+	err = os.Remove(stateDumpFilePath)

Review Comment:
   This should be in a `defer` call. 
   Also, just use `assert.NilError()`.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@yunikorn.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org