Skip to content

Commit

Permalink
Update tests for daemon embedding job check
Browse files Browse the repository at this point in the history
  • Loading branch information
var77 committed May 28, 2024
1 parent fd9199e commit e839ad3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spec/model/lantern/lantern_doctor_query_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@
where: instance_double(Sequel::Dataset,
where: instance_double(Sequel::Dataset,
all: [{schema: "public", table: "test", src_column: "test-src", dst_column: "test-dst"}]))))))
expect(serv).to receive(:run_query).with("SELECT (SELECT COUNT(*) FROM \"public\".\"test\" WHERE \"test-src\" IS NOT NULL AND \"test-src\" != '' AND \"test-dst\" IS NULL) > 1000", db: "postgres", user: "postgres").and_return("t")
expect(serv).to receive(:run_query).with("SELECT (SELECT COUNT(*) FROM \"public\".\"test\" WHERE \"test-src\" IS NOT NULL AND \"test-src\" != '' AND \"test-src\" != 'Error: Summary failed (llm)' AND \"test-dst\" IS NULL) > 1000", db: "postgres", user: "postgres").and_return("t")
expect(lantern_doctor_query.check_daemon_embedding_jobs("postgres", "postgres")).to eq("t")
end

Expand Down Expand Up @@ -426,7 +426,7 @@
where: instance_double(Sequel::Dataset,
where: instance_double(Sequel::Dataset,
all: [{schema: "public", table: "test", src_column: "test-src", dst_column: "test-dst"}]))))))
expect(serv).to receive(:run_query).with("SELECT (SELECT COUNT(*) FROM \"public\".\"test\" WHERE \"test-src\" IS NOT NULL AND \"test-src\" != '' AND \"test-dst\" IS NULL) > 1000", db: "postgres", user: "postgres").and_return("f")
expect(serv).to receive(:run_query).with("SELECT (SELECT COUNT(*) FROM \"public\".\"test\" WHERE \"test-src\" IS NOT NULL AND \"test-src\" != '' AND \"test-src\" != 'Error: Summary failed (llm)' AND \"test-dst\" IS NULL) > 1000", db: "postgres", user: "postgres").and_return("f")
expect(lantern_doctor_query.check_daemon_embedding_jobs("postgres", "postgres")).to eq("f")
end

Expand Down

0 comments on commit e839ad3

Please sign in to comment.