From ade4860b7c52e804e0110f63513778ba22dab62e Mon Sep 17 00:00:00 2001
From: Igor Kuznetsov <kuznetsovin@gmail.com>
Date: Thu, 14 Apr 2022 11:33:19 +0300
Subject: [PATCH] fix: fix space for local load test

---
 stress-test/data_generator.lua | 16 ++++++++--------
 stress-test/k6.js              |  4 ++--
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/stress-test/data_generator.lua b/stress-test/data_generator.lua
index b2a256923a..d1b33574fd 100755
--- a/stress-test/data_generator.lua
+++ b/stress-test/data_generator.lua
@@ -22,7 +22,7 @@ api:eval("function set_schema(s) local cartridge = require('cartridge'); cartrid
 
 local config = {
     spaces = {
-        VEHICLE_ACTUAL = {
+        vehicle_actual = {
             format = {
                 {
                     name = "id",
@@ -81,7 +81,7 @@ local config = {
             is_local = false,
             sharding_key = { "id" },
         },
-        VEHICLE_HISTORY = {
+        vehicle_history = {
             format = {
                 {
                     name = "id",
@@ -159,7 +159,7 @@ storage2:eval("return box.space.VEHICLE_HISTORY:truncate();")
 
 for i = 1, record_count, 1 do
     api:call("insert_record", {
-        "VEHICLE_ACTUAL",
+        "vehicle_actual",
         {
             id = i,
             gov_number = "a777a750",
@@ -168,7 +168,7 @@ for i = 1, record_count, 1 do
     })
 
     api:call("insert_record", {
-        "VEHICLE_HISTORY",
+        "vehicle_history",
         {
             id = i,
             gov_number = "a777a750",
@@ -184,16 +184,16 @@ fiber.sleep(3)
 print(
         string.format(
                 "Storage 1 has %d actual and %d history records",
-                storage1:eval("return box.space.VEHICLE_ACTUAL:count();"),
-                storage1:eval("return box.space.VEHICLE_HISTORY:count();")
+                storage1:eval("return box.space.vehicle_actual:count();"),
+                storage1:eval("return box.space.vehicle_history:count();")
         )
 )
 
 print(
         string.format(
                 "Storage 2 has %d actual and %d history records",
-                storage2:eval("return box.space.VEHICLE_ACTUAL:count();"),
-                storage2:eval("return box.space.VEHICLE_HISTORY:count();")
+                storage2:eval("return box.space.vehicle_actual:count();"),
+                storage2:eval("return box.space.vehicle_history:count();")
         )
 )
 
diff --git a/stress-test/k6.js b/stress-test/k6.js
index ad691b6cab..b60142e5a6 100644
--- a/stress-test/k6.js
+++ b/stress-test/k6.js
@@ -10,11 +10,11 @@ let queries = Array.from(
     (_, id) => `SELECT *
                 FROM (
                          SELECT "id", "gov_number"
-                         FROM VEHICLE_ACTUAL
+                         FROM "vehicle_actual"
                          WHERE "sys_op" = 0
                          UNION ALL
                          SELECT "id", "gov_number"
-                         FROM VEHICLE_HISTORY
+                         FROM "vehicle_history"
                          WHERE "sys_op" < 1
                      ) as "t1"
                 WHERE "id" = ${id}`
-- 
GitLab