mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-06-14 16:07:50 +00:00
tests: Faster vector::binary_quantized IT tests
Use shared server + unique indices where possible Related-to: https://github.com/meilisearch/meilisearch/issues/4840 Signed-off-by: Martin Tzvetanov Grigorov <mgrigorov@apache.org>
This commit is contained in:
parent
20049669c9
commit
5efc78db55
@ -6,8 +6,8 @@ use crate::vector::generate_default_user_provided_documents;
|
|||||||
|
|
||||||
#[actix_rt::test]
|
#[actix_rt::test]
|
||||||
async fn retrieve_binary_quantize_status_in_the_settings() {
|
async fn retrieve_binary_quantize_status_in_the_settings() {
|
||||||
let server = Server::new().await;
|
let server = Server::new_shared();
|
||||||
let index = server.index("doggo");
|
let index = server.unique_index();
|
||||||
|
|
||||||
let (response, code) = index
|
let (response, code) = index
|
||||||
.update_settings(json!({
|
.update_settings(json!({
|
||||||
@ -65,8 +65,8 @@ async fn retrieve_binary_quantize_status_in_the_settings() {
|
|||||||
|
|
||||||
#[actix_rt::test]
|
#[actix_rt::test]
|
||||||
async fn binary_quantize_before_sending_documents() {
|
async fn binary_quantize_before_sending_documents() {
|
||||||
let server = Server::new().await;
|
let server = Server::new_shared();
|
||||||
let index = server.index("doggo");
|
let index = server.unique_index();
|
||||||
|
|
||||||
let (response, code) = index
|
let (response, code) = index
|
||||||
.update_settings(json!({
|
.update_settings(json!({
|
||||||
@ -139,8 +139,8 @@ async fn binary_quantize_before_sending_documents() {
|
|||||||
|
|
||||||
#[actix_rt::test]
|
#[actix_rt::test]
|
||||||
async fn binary_quantize_after_sending_documents() {
|
async fn binary_quantize_after_sending_documents() {
|
||||||
let server = Server::new().await;
|
let server = Server::new_shared();
|
||||||
let index = server.index("doggo");
|
let index = server.unique_index();
|
||||||
|
|
||||||
let (response, code) = index
|
let (response, code) = index
|
||||||
.update_settings(json!({
|
.update_settings(json!({
|
||||||
@ -226,8 +226,8 @@ async fn binary_quantize_after_sending_documents() {
|
|||||||
|
|
||||||
#[actix_rt::test]
|
#[actix_rt::test]
|
||||||
async fn try_to_disable_binary_quantization() {
|
async fn try_to_disable_binary_quantization() {
|
||||||
let server = Server::new().await;
|
let server = Server::new_shared();
|
||||||
let index = server.index("doggo");
|
let index = server.unique_index();
|
||||||
|
|
||||||
let (response, code) = index
|
let (response, code) = index
|
||||||
.update_settings(json!({
|
.update_settings(json!({
|
||||||
@ -256,11 +256,11 @@ async fn try_to_disable_binary_quantization() {
|
|||||||
.await;
|
.await;
|
||||||
snapshot!(code, @"202 Accepted");
|
snapshot!(code, @"202 Accepted");
|
||||||
let ret = server.wait_task(response.uid()).await;
|
let ret = server.wait_task(response.uid()).await;
|
||||||
snapshot!(ret, @r#"
|
snapshot!(json_string!(ret, { ".uid" => "[uid]", ".batchUid" => "[batch_uid]", ".duration" => "[duration]", ".enqueuedAt" => "[date]", ".finishedAt" => "[date]", ".startedAt" => "[date]" }), @r#"
|
||||||
{
|
{
|
||||||
"uid": "[uid]",
|
"uid": "[uid]",
|
||||||
"batchUid": "[batch_uid]",
|
"batchUid": "[batch_uid]",
|
||||||
"indexUid": "doggo",
|
"indexUid": "[uuid]",
|
||||||
"status": "failed",
|
"status": "failed",
|
||||||
"type": "settingsUpdate",
|
"type": "settingsUpdate",
|
||||||
"canceledBy": null,
|
"canceledBy": null,
|
||||||
@ -274,7 +274,7 @@ async fn try_to_disable_binary_quantization() {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"error": {
|
"error": {
|
||||||
"message": "Index `doggo`: `.embedders.manual.binaryQuantized`: Cannot disable the binary quantization.\n - Note: Binary quantization is a lossy operation that cannot be reverted.\n - Hint: Add a new embedder that is non-quantized and regenerate the vectors.",
|
"message": "Index `[uuid]`: `.embedders.manual.binaryQuantized`: Cannot disable the binary quantization.\n - Note: Binary quantization is a lossy operation that cannot be reverted.\n - Hint: Add a new embedder that is non-quantized and regenerate the vectors.",
|
||||||
"code": "invalid_settings_embedders",
|
"code": "invalid_settings_embedders",
|
||||||
"type": "invalid_request",
|
"type": "invalid_request",
|
||||||
"link": "https://docs.meilisearch.com/errors#invalid_settings_embedders"
|
"link": "https://docs.meilisearch.com/errors#invalid_settings_embedders"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user