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

add comment for config assert #188

Merged
merged 1 commit into from
Dec 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ case class DataBaseConfigEntry(graphAddress: List[String],
* @param password
*/
case class UserConfigEntry(user: String, password: String) {
require(user.trim.nonEmpty && password.trim.nonEmpty)
require(user.trim.nonEmpty && password.trim.nonEmpty, "user and password cannot be empty.")

override def toString: String =
s"UserConfigEntry{user:$user, password:xxxxx}"
Expand Down Expand Up @@ -132,7 +132,8 @@ case class ExecutionConfigEntry(timeout: Int, retry: Int, interval: Int) {
* @param errorMaxSize
*/
case class ErrorConfigEntry(errorPath: String, errorMaxSize: Int) {
require(errorPath.trim.nonEmpty && errorMaxSize > 0)
require(errorPath.trim.nonEmpty && errorMaxSize >= 0,
"errorPath cannot be empty, and error maxSize cannot be less than 0")

override def toString: String =
s"ErrorConfigEntry:{errorPath:$errorPath, errorMaxSize:$errorMaxSize}"
Expand All @@ -145,7 +146,7 @@ case class ErrorConfigEntry(errorPath: String, errorMaxSize: Int) {
* @param timeout
*/
case class RateConfigEntry(limit: Int, timeout: Int) {
require(limit > 0 && timeout > 0)
require(limit > 0, "rate limit must be larger than 0")

override def toString: String = s"RateConfigEntry:{limit:$limit, timeout:$timeout}"
}
Expand Down
Loading