Skip to content

Commit 35a3aeb

Browse files
committed
PR Feedback: rename builder method, revert query and change sleep function in test
1 parent 084675f commit 35a3aeb

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

database/src/pool.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1350,7 +1350,7 @@ mod tests {
13501350
assert_eq!(job.request_tag(), benchmark_request.tag().unwrap());
13511351

13521352
/* Make the job take some amount of time */
1353-
std::thread::sleep(Duration::from_millis(1000));
1353+
tokio::time::sleep(Duration::from_millis(1000)).await;
13541354

13551355
/* Mark the job as complete */
13561356
db.mark_benchmark_job_as_completed(job.id(), BenchmarkJobConclusion::Success)

database/src/pool/postgres.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1993,8 +1993,8 @@ where
19931993
-- previously, so that we can finish them. Also prefer
19941994
-- mandatory jobs over optional ones.
19951995
CASE
1996-
WHEN (status = $5 AND is_optional = FALSE) THEN 0
1997-
WHEN (status = $1 AND is_optional = FALSE) THEN 1
1996+
WHEN status = $5 THEN 0
1997+
WHEN status = $1 THEN 1
19981998
ELSE 2
19991999
END,
20002000
request_tag,

database/src/tests/builder.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ impl JobBuilder {
126126
self
127127
}
128128

129-
pub fn is_optional(mut self, is_optional: bool) -> Self {
129+
pub fn make_optional(mut self, is_optional: bool) -> Self {
130130
self.is_optional = is_optional;
131131
self
132132
}

0 commit comments

Comments
 (0)