prostgles-server 4.2.639 → 4.2.640

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/debug/sync-logging-build.log +4 -0
  2. package/debug/sync-logging-main.log +688 -0
  3. package/debug/sync-logging-server-build.log +0 -0
  4. package/debug/sync-race-client-build.log +12 -0
  5. package/debug/sync-race-main-e2e-final.log +659 -0
  6. package/debug/sync-race-main-e2e.log +643 -0
  7. package/debug/sync-race-server-build.log +11 -0
  8. package/debug/sync-race-test-lib-final.log +59 -0
  9. package/debug/sync-race-test-lib.log +59 -0
  10. package/debug/sync-review-build.log +4 -0
  11. package/debug/sync-review-client-build.log +0 -0
  12. package/debug/sync-review-main-final.log +685 -0
  13. package/debug/sync-review-main.log +644 -0
  14. package/debug/sync-review-server-build.log +0 -0
  15. package/debug/sync-review-syncData.js +147 -0
  16. package/debug/sync-review-without-reconcile.log +647 -0
  17. package/dist/Auth/AuthHandler.d.ts +2 -2
  18. package/dist/Auth/AuthHandler.d.ts.map +1 -1
  19. package/dist/Auth/AuthHandler.js.map +1 -1
  20. package/dist/Auth/AuthTypes.d.ts +2 -2
  21. package/dist/Auth/AuthTypes.d.ts.map +1 -1
  22. package/dist/Auth/utils/getClientRequestIPsInfo.d.ts +2 -2
  23. package/dist/Auth/utils/getClientRequestIPsInfo.d.ts.map +1 -1
  24. package/dist/DBEventsManager.d.ts +5 -5
  25. package/dist/DBEventsManager.d.ts.map +1 -1
  26. package/dist/DBEventsManager.js.map +1 -1
  27. package/dist/DboBuilder/DboBuilderTypes.d.ts +1 -1
  28. package/dist/DboBuilder/DboBuilderTypes.d.ts.map +1 -1
  29. package/dist/DboBuilder/runSql/QueryStreamer.d.ts +2 -2
  30. package/dist/DboBuilder/runSql/QueryStreamer.d.ts.map +1 -1
  31. package/dist/Logging.d.ts +4 -0
  32. package/dist/Logging.d.ts.map +1 -1
  33. package/dist/Prostgles.d.ts +4 -4
  34. package/dist/Prostgles.d.ts.map +1 -1
  35. package/dist/Prostgles.js.map +1 -1
  36. package/dist/ProstglesTypes.d.ts +3 -3
  37. package/dist/ProstglesTypes.d.ts.map +1 -1
  38. package/dist/PubSubManager/PubSubManager.d.ts +8 -7
  39. package/dist/PubSubManager/PubSubManager.d.ts.map +1 -1
  40. package/dist/PubSubManager/PubSubManager.js.map +1 -1
  41. package/dist/PubSubManager/SyncReplication/getSyncUtilFunctions.d.ts +2 -2
  42. package/dist/PubSubManager/SyncReplication/getSyncUtilFunctions.d.ts.map +1 -1
  43. package/dist/PubSubManager/SyncReplication/getSyncUtilFunctions.js +1 -3
  44. package/dist/PubSubManager/SyncReplication/getSyncUtilFunctions.js.map +1 -1
  45. package/dist/PubSubManager/SyncReplication/logSyncError.d.ts +6 -0
  46. package/dist/PubSubManager/SyncReplication/logSyncError.d.ts.map +1 -0
  47. package/dist/PubSubManager/SyncReplication/logSyncError.js +18 -0
  48. package/dist/PubSubManager/SyncReplication/logSyncError.js.map +1 -0
  49. package/dist/PubSubManager/SyncReplication/syncData.d.ts.map +1 -1
  50. package/dist/PubSubManager/SyncReplication/syncData.js +48 -27
  51. package/dist/PubSubManager/SyncReplication/syncData.js.map +1 -1
  52. package/dist/PubSubManager/addSync.d.ts.map +1 -1
  53. package/dist/PubSubManager/addSync.js +3 -3
  54. package/dist/PubSubManager/addSync.js.map +1 -1
  55. package/dist/PubSubManager/addTrigger.d.ts +2 -2
  56. package/dist/PubSubManager/addTrigger.d.ts.map +1 -1
  57. package/dist/PubSubManager/addTrigger.js.map +1 -1
  58. package/dist/WebsocketAPI/onSocketConnected.d.ts +2 -2
  59. package/dist/WebsocketAPI/onSocketConnected.d.ts.map +1 -1
  60. package/dist/WebsocketAPI/onSocketConnected.js.map +1 -1
  61. package/dist/WebsocketAPI/pushSocketSchema.d.ts +2 -2
  62. package/dist/WebsocketAPI/pushSocketSchema.d.ts.map +1 -1
  63. package/dist/WebsocketAPI/pushSocketSchema.js.map +1 -1
  64. package/lib/Auth/AuthHandler.ts +2 -2
  65. package/lib/Auth/AuthTypes.ts +2 -2
  66. package/lib/Auth/utils/getClientRequestIPsInfo.ts +2 -2
  67. package/lib/DBEventsManager.ts +5 -5
  68. package/lib/DboBuilder/DboBuilderTypes.ts +1 -1
  69. package/lib/DboBuilder/runSql/QueryStreamer.ts +2 -2
  70. package/lib/Logging.ts +5 -0
  71. package/lib/Prostgles.ts +2 -2
  72. package/lib/ProstglesTypes.ts +3 -3
  73. package/lib/PubSubManager/PubSubManager.ts +7 -6
  74. package/lib/PubSubManager/SyncReplication/getSyncUtilFunctions.ts +3 -8
  75. package/lib/PubSubManager/SyncReplication/logSyncError.ts +22 -0
  76. package/lib/PubSubManager/SyncReplication/syncData.ts +54 -30
  77. package/lib/PubSubManager/addSync.ts +3 -4
  78. package/lib/PubSubManager/addTrigger.ts +2 -2
  79. package/lib/WebsocketAPI/onSocketConnected.ts +2 -2
  80. package/lib/WebsocketAPI/pushSocketSchema.ts +2 -2
  81. package/package.json +1 -1
@@ -0,0 +1,688 @@
1
+
2
+ > server_tests@1.0.0 test-client
3
+ > TEST_TYPE=client node --trace-uncaught --test dist/server/index.js
4
+
5
+ Prostgles: SQL file executed successfuly /home/s/prostgles-server-js/tests/server/init.sql
6
+ Running queries: /* prostgles internal query that should be excluded from schema watch */
7
+
8
+ DROP TABLE IF EXISTS "lookup_col1" CASCADE;
9
+ CREATE TABLE IF NOT EXISTS "lookup_col1" (
10
+ id TEXT PRIMARY KEY
11
+ , "description" TEXT
12
+ );
13
+ INSERT INTO "lookup_col1" ("id", "description") VALUES ('a','desc') ON CONFLICT DO NOTHING;
14
+ INSERT INTO "lookup_col1" ("id", "description") VALUES ('b',null) ON CONFLICT DO NOTHING;
15
+ Running queries: /* prostgles internal query that should be excluded from schema watch */
16
+
17
+ CREATE TABLE "files" (
18
+ "id" UUID PRIMARY KEY DEFAULT gen_random_uuid() ,
19
+ "storage_key" UUID UNIQUE ,
20
+ "extension" TEXT NOT NULL DEFAULT '' ,
21
+ "content_type" TEXT NOT NULL DEFAULT '' ,
22
+ "content_length" BIGINT NOT NULL DEFAULT 0 ,
23
+ "etag" TEXT NOT NULL DEFAULT '' ,
24
+ "original_name" TEXT NOT NULL ,
25
+ "original_last_modified" TIMESTAMPTZ ,
26
+ "description" TEXT ,
27
+ "url" TEXT NOT NULL DEFAULT '' ,
28
+ "cloud_url" TEXT ,
29
+ "signed_url" TEXT ,
30
+ "signed_url_expires" BIGINT ,
31
+ "added" TIMESTAMP NOT NULL DEFAULT NOW() ,
32
+ "updated" TIMESTAMP NOT NULL DEFAULT NOW() ,
33
+ "deleted" TIMESTAMPTZ ,
34
+ "deleted_from_storage" TIMESTAMPTZ ,
35
+ "data" BYTEA NOT NULL CHECK (data = decode('01', 'hex')) ,
36
+ "version" INTEGER NOT NULL DEFAULT 1 ,
37
+ "metadata" JSONB CHECK(prostgles.validate_jsonb_schema('{"nullable":true,"type":{"description":{"type":"string"}}}'::TEXT, "metadata", '{"table":"files","column":"metadata"}' ))
38
+ );
39
+ CREATE TABLE "files_versions" (
40
+ "id" UUID PRIMARY KEY DEFAULT gen_random_uuid() ,
41
+ "storage_key" UUID NOT NULL ,
42
+ "extension" TEXT NOT NULL DEFAULT '' ,
43
+ "content_type" TEXT NOT NULL DEFAULT '' ,
44
+ "content_length" BIGINT NOT NULL DEFAULT 0 ,
45
+ "etag" TEXT NOT NULL DEFAULT '' ,
46
+ "original_name" TEXT NOT NULL ,
47
+ "original_last_modified" TIMESTAMPTZ ,
48
+ "description" TEXT ,
49
+ "url" TEXT NOT NULL DEFAULT '' ,
50
+ "cloud_url" TEXT ,
51
+ "signed_url" TEXT ,
52
+ "signed_url_expires" BIGINT ,
53
+ "added" TIMESTAMP NOT NULL DEFAULT NOW() ,
54
+ "updated" TIMESTAMP NOT NULL DEFAULT NOW() ,
55
+ "deleted" TIMESTAMPTZ ,
56
+ "deleted_from_storage" TIMESTAMPTZ ,
57
+ "file_id" UUID NOT NULL ,
58
+ "version" INTEGER NOT NULL ,
59
+ "created" TIMESTAMP NOT NULL DEFAULT NOW() ,
60
+ "metadata" JSONB CHECK(prostgles.validate_jsonb_schema('{"nullable":true,"type":{"description":{"type":"string"}}}'::TEXT, "metadata", '{"table":"files_versions","column":"metadata"}' ))
61
+ );
62
+ ALTER TABLE "files_versions" ADD CONSTRAINT "prostgles_file_version_e24fec525e76b3433749621f589d35d9" FOREIGN KEY (file_id) REFERENCES "files"(id) ON DELETE CASCADE;
63
+ CREATE UNIQUE INDEX "prostgles_file_version_9692aae50022f45f1098646939b287b1_key" ON "files_versions" (file_id, version);
64
+ COMMENT ON INDEX "prostgles_file_version_9692aae50022f45f1098646939b287b1_key" IS 'd4af15d064cae99adac0c1194199a9e3';
65
+ CREATE TABLE "users_public_info" (
66
+ "id" SERIAL PRIMARY KEY ,
67
+ "name" TEXT ,
68
+ "avatar" UUID REFERENCES files ON DELETE CASCADE ,
69
+ "sid" TEXT
70
+ );
71
+ DROP TABLE IF EXISTS "users";
72
+ CREATE TABLE "users" (
73
+ "id" SERIAL PRIMARY KEY ,
74
+ "email" TEXT NOT NULL ,
75
+ "status" TEXT NOT NULL CHECK("status" = 'active' OR "status" = 'disabled' OR "status" = 'pending'),
76
+ "type" TEXT NOT NULL ,
77
+ "preferences" JSONB NOT NULL CHECK(prostgles.validate_jsonb_schema('{"type":{"showIntro":{"type":"boolean","optional":true},"theme":{"enum":["light","dark","auto"],"optional":true},"others":{"type":"any[]"}}}'::TEXT, "preferences", '{"table":"users","column":"preferences"}' ))
78
+ );
79
+ DROP TABLE IF EXISTS "tjson";
80
+ CREATE TABLE "tjson" (
81
+ "json" JSONB NOT NULL CHECK(prostgles.validate_jsonb_schema('{"type":{"a":{"type":"boolean"},"arr":{"enum":["1","2","3"]},"arr1":{"enum":[1,2,3]},"arr2":{"type":"integer[]"},"arrStr":{"type":"string[]","optional":true,"nullable":true},"o":{"optional":true,"nullable":true,"oneOfType":[{"o1":"integer"},{"o2":"boolean"}]}}}'::TEXT, "json", '{"table":"tjson","column":"json"}' )),
82
+ "colOneOf" TEXT NOT NULL CHECK("colOneOf" = 'a' OR "colOneOf" = 'b' OR "colOneOf" = 'c'),
83
+ "status" JSONB CHECK(prostgles.validate_jsonb_schema('{"nullable":true,"oneOfType":[{"ok":{"type":"string"}},{"err":{"type":"string"}},{"loading":{"type":{"loaded":{"type":"number"},"total":{"type":"number"}}}}]}'::TEXT, "status", '{"table":"tjson","column":"status"}' )),
84
+ "jsonOneOf" JSONB CHECK(prostgles.validate_jsonb_schema('{"nullable":true,"oneOfType":[{"command":{"enum":["a"]}},{"command":{"enum":["b"]},"option":{"type":"integer[]"}}]}'::TEXT, "jsonOneOf", '{"table":"tjson","column":"jsonOneOf"}' )),
85
+ "table_config" JSONB CHECK(prostgles.validate_jsonb_schema('{"nullable":true,"type":{"referencedTables":{"optional":true,"arrayOfType":{"name":"string","minFiles":"number"}},"recType":{"nullable":true,"optional":true,"record":{"keysEnum":["a","b"],"values":{"type":{"bools":"boolean[]"}}}}}}'::TEXT, "table_config", '{"table":"tjson","column":"table_config"}' ))
86
+ );
87
+ CREATE TABLE "uuid_text" (
88
+ "id" UUID ,
89
+ "col1" TEXT REFERENCES lookup_col1 (id) ,
90
+ "col2" TEXT REFERENCES lookup_col1 (id) ,
91
+ "col3" TEXT REFERENCES lookup_col1
92
+ );
93
+ DROP TABLE IF EXISTS "api_table";
94
+ CREATE TABLE "api_table" (
95
+ "id" SERIAL PRIMARY KEY
96
+ );
97
+ CREATE TABLE "rec_ref" (
98
+ "id" SERIAL PRIMARY KEY
99
+ );
100
+ CREATE TABLE "rec" (
101
+ "id" SERIAL PRIMARY KEY ,
102
+ "parent_id" INTEGER REFERENCES rec ,
103
+ "recf" INTEGER REFERENCES rec_ref
104
+ );
105
+ Prostgles: Initiated file manager. Max allowed file size: 1MB (maxHttpBufferSize = 1e6). To increase this set maxHttpBufferSize in socket.io server init options
106
+ Prostgles: Created typescript schema definition file:
107
+ DBGeneratedSchema.ts
108
+ (server): prostgles onReady
109
+ (server): Waiting for client...
110
+ (client) t+ 0ms Started client...
111
+ onSocketConnect JbMkuJlFI_J2cVHkAAAA
112
+ (server): Client connected -> console does not work. use log function. socket.id: JbMkuJlFI_J2cVHkAAAA
113
+ (client) t+ 38ms Client connect.
114
+ (client) t+ 169ms TEST_NAME: main Started
115
+ Client log (client) t+ 189ms Starting isomorphic queries
116
+ ▶ Isomorphic queries
117
+ ✔ Deleting stale data (24.249608ms)
118
+ {
119
+ message: 'malformed array literal: "a"',
120
+ length: 149,
121
+ name: 'error',
122
+ severity: 'ERROR',
123
+ code: '22P02',
124
+ detail: 'Array value must start with "{" or dimension information.',
125
+ position: '325',
126
+ file: 'arrayfuncs.c',
127
+ line: '262',
128
+ routine: 'array_in',
129
+ query: '-- prostgles query id: a8c95b38-5f47-4ce7-8d30-1a9f5cbeb2cc\n' +
130
+ 'SET LOCAL "prostgles.user" \n' +
131
+ `TO '{"id":"1","type":"public"}';\n` +
132
+ 'SELECT \n' +
133
+ ' "prostgles_root_table_alias"."id" AS "id", \n' +
134
+ ' "prostgles_root_table_alias"."h" AS "h", \n' +
135
+ ' "prostgles_root_table_alias"."name" AS "name" \n' +
136
+ ' FROM ( \n' +
137
+ ' SELECT * \n' +
138
+ ' FROM items \n' +
139
+ ` WHERE "h" = 'a' \n` +
140
+ ' ) prostgles_root_table_alias \n' +
141
+ ' LIMIT 0',
142
+ code_info: 'invalid_text_representation'
143
+ }
144
+ {
145
+ message: 'malformed array literal: "a"',
146
+ length: 149,
147
+ name: 'error',
148
+ severity: 'ERROR',
149
+ code: '22P02',
150
+ detail: 'Array value must start with "{" or dimension information.',
151
+ position: '325',
152
+ file: 'arrayfuncs.c',
153
+ line: '262',
154
+ routine: 'array_in',
155
+ query: '-- prostgles query id: 8cc8c0f9-827a-465c-afc4-c9ffdf1bd009\n' +
156
+ 'SET LOCAL "prostgles.user" \n' +
157
+ `TO '{"id":"1","type":"public"}';\n` +
158
+ 'SELECT \n' +
159
+ ' "prostgles_root_table_alias"."id" AS "id", \n' +
160
+ ' "prostgles_root_table_alias"."h" AS "h", \n' +
161
+ ' "prostgles_root_table_alias"."name" AS "name" \n' +
162
+ ' FROM ( \n' +
163
+ ' SELECT * \n' +
164
+ ' FROM items \n' +
165
+ ` WHERE "h" = 'a' \n` +
166
+ ' ) prostgles_root_table_alias \n' +
167
+ ' LIMIT 0',
168
+ code_info: 'invalid_text_representation'
169
+ }
170
+ ✔ Error structure malformed array literal (32.505412ms)
171
+ ✔ Table info (5.002265ms)
172
+ ✔ Prepare data (67.153474ms)
173
+ ✔ Test bytea (14.557109ms)
174
+ ✔ abortSignal terminates a running query (5551.003324ms)
175
+ ✔ Client queries are aborted no more than after n seconds (14012.498714ms)
176
+ ✔ Subscription tracked_columns get merged correctly (0.415209ms)
177
+ getPubSubManagerInitQuery: No prostgles.versions table found. Creating...
178
+ Created PubSubManager
179
+ ✔ Aggregate subscription tracks FILTER and ORDER BY dependencies (1023.001193ms)
180
+ ✔ CASE select and subscription dependencies (656.171891ms)
181
+ ✔ Subscription tracks non-selected ORDER BY columns (648.460638ms)
182
+ ✔ merge json (8.432472ms)
183
+ ✔ json array converted to pg array filter bug (3.975285ms)
184
+ ✔ onConflict do update (15.37979ms)
185
+ ✔ Local file upload (61.602751ms)
186
+ ✔ Local file delete (34.697898ms)
187
+ ✔ Local file update (64.680417ms)
188
+ ✔ getColumns definition (3.179983ms)
189
+ ✔ returnType (1.426177ms)
190
+ ✔ Table config triggers (11.467844ms)
191
+ ✔ $unnest_words (2.357737ms)
192
+ ✔ Group by/Distinct (3.564699ms)
193
+ ✔ sql returntype default-with-rollback (26.942537ms)
194
+ ✔ returnType: value (2.384396ms)
195
+ ✔ PostgreSQL array element (10.469683ms)
196
+ ✔ FTS filtering (8.189362ms)
197
+ ✔ $term_highlight (11.773981ms)
198
+ ✔ funcFilters: $term_highlight (3.71938ms)
199
+ Client log (client) t+ 22527ms [{"name":null}]
200
+ Client log (client) t+ 22532ms [{"name":"zz3zz1"}]
201
+ Pushing 1 rows to socket x9
202
+ Client log (client) t+ 23172ms []
203
+ ✔ subscribe skipChangedColumnsCheck false by default = sub should not fire if selected data did not change (862.532674ms)
204
+ Pushing 0 rows to socket
205
+ Client log (client) t+ 25904ms [{"name":null}]
206
+ Client log (client) t+ 25911ms [{"name":"zz3zz1"}]
207
+ Client log (client) t+ 26129ms [{"name":"zz3zz1"}]
208
+ Client log (client) t+ 26346ms [{"name":"zz3zz1"}]
209
+ Pushing 1 rows to socket x4
210
+ Client log (client) t+ 26556ms []
211
+ ✔ subscribe skipChangedColumnsCheck true (3384.395571ms)
212
+ Pushing 0 rows to socket
213
+ Pushing 1 rows to socket x4
214
+ Client log unsubscribe start - various
215
+ Client log unsubscribe end - various
216
+ ✔ subscribe (42.107872ms)
217
+ Pushing 0 rows to socket
218
+ Pushing 1 rows to socket
219
+ ✔ subscribe to schema.table (13.383328ms)
220
+ Pushing 2 rows to socket
221
+ ✔ parallel subscriptions (2008.268987ms)
222
+ Client log (client) t+ 32996ms updateAll done in 1670
223
+ Client log (client) t+ 34566ms updateAll done in 1568
224
+ Pushing 0 rows to socket
225
+ Pushing 3 rows to socket
226
+ Client log (client) t+ 35252ms Locks: [{"pid":118,"blocking_pids":[120],"wait_event":null,"wait_event_type":null,"query":"\n BEGIN;\n UPDATE various\n SET name = 'slowtx1056'\n WHERE id = 1056;\n SELECT pg_sleep(0.01);\n COMMIT;\n\n ","blocking_query":"\n BEGIN;\n UPDATE various\n SET name = 'slowtx1053'\n WHERE id = 1053;\n SELECT pg_sleep(0.01);\n COMMIT;\n\n "}]
227
+ Client log (client) t+ 35703ms Locks: [{"pid":116,"blocking_pids":[114],"wait_event":"object","wait_event_type":"Lock","query":"\n BEGIN;\n UPDATE various\n SET name = 'slowtx1387'\n WHERE id = 1387;\n SELECT pg_sleep(0.01);\n COMMIT;\n\n ","blocking_query":null}]
228
+ Client log (client) t+ 35970ms Locks: [{"pid":120,"blocking_pids":[114],"wait_event":"object","wait_event_type":"Lock","query":"\n BEGIN;\n UPDATE various\n SET name = 'slowtx1571'\n WHERE id = 1571;\n SELECT pg_sleep(0.01);\n COMMIT;\n\n ","blocking_query":"\n BEGIN;\n UPDATE various\n SET name = 'slowtx1567'\n WHERE id = 1567;\n SELECT pg_sleep(0.01);\n COMMIT;\n\n "}]
229
+ Client log (client) t+ 35986ms Locks: [{"pid":121,"blocking_pids":[116],"wait_event":null,"wait_event_type":null,"query":"\n BEGIN;\n UPDATE various\n SET name = 'slowtx1581'\n WHERE id = 1581;\n SELECT pg_sleep(0.01);\n COMMIT;\n\n ","blocking_query":"\n BEGIN;\n UPDATE various\n SET name = 'slowtx1582'\n WHERE id = 1582;\n SELECT pg_sleep(0.01);\n COMMIT;\n\n "}]
230
+ Client log (client) t+ 36215ms Locks: [{"pid":117,"blocking_pids":[119],"wait_event":"PgSleep","wait_event_type":"Timeout","query":"\n BEGIN;\n UPDATE various\n SET name = 'slowtx1742'\n WHERE id = 1742;\n SELECT pg_sleep(0.01);\n COMMIT;\n\n ","blocking_query":null}]
231
+ Pushing 994 rows to socket
232
+ Client log (client) t+ 36571ms updateAll done in 1995
233
+ Pushing 1000 rows to socket x2
234
+ ✔ subscriptions do not serialize transactions (9762.001114ms)
235
+ Pushing 3 rows to socket
236
+ Pushing 1 rows to socket
237
+ throttling sub for 1700 ms
238
+ throttling finished. pushSubData...
239
+ Pushing 1 rows to socket
240
+ throttling sub for 1700 ms
241
+ ✔ subscribeOne with throttle (1751.054242ms)
242
+ throttling sub for 1700 ms
243
+ throttling finished. pushSubData...
244
+ ✔ subscribeOne with throttle skipFirst: true (1703.593294ms)
245
+ Pushing 1 rows to socket
246
+ throttling finished. pushSubData...
247
+ Pushing 1 rows to socket
248
+ ✔ subscribeOne without skipFirst (1032.514848ms)
249
+ Pushing 0 rows to socket
250
+ Pushing 1 rows to socket
251
+ ✔ subscribeOne with skipFirst: true (1531.904709ms)
252
+ Pushing 0 rows to socket x2
253
+ ✔ subscribeOne actions: { insert: true } (1530.008289ms)
254
+ Pushing 1 rows to socket
255
+ ✔ subscribeOne actions: { insert: false } (1546.613143ms)
256
+ ✔ JSON filtering (1.996829ms)
257
+ ✔ Complex filtering (2.766505ms)
258
+ ✔ template_string function (2.11361ms)
259
+ ✔ Between filtering (1.558024ms)
260
+ ✔ In filtering (2.306392ms)
261
+ ✔ Order by (2.869343ms)
262
+ ✔ Order by aliased func (1.85776ms)
263
+ ✔ Filter by aliased func (1.54796ms)
264
+ ✔ Count with Filter by aliased func (2.185438ms)
265
+ ✔ Count with Aggregate and Filter by aliased func (2.294054ms)
266
+ ✔ Count with complex filter (2.145739ms)
267
+ ✔ Order by aggregation (1.616214ms)
268
+ ✔ Aggregate FILTER and ORDER BY (1.973074ms)
269
+ ✔ Column alias func (1.635206ms)
270
+ ✔ Order by colliding alias name (1.502128ms)
271
+ ✔ Update batch example (4.642584ms)
272
+ Client log TODO: socket.io stringifies dates
273
+ ✔ Function example (18.131832ms)
274
+ ✔ JSONB filtering (8.958318ms)
275
+ ✔ Postgis examples (17.987385ms)
276
+ ✔ jsonbSchema validation (5.787535ms)
277
+ ✔ find and findOne (2.479379ms)
278
+ ✔ Result size (2.25744ms)
279
+ ✔ Basic exists (5.354864ms)
280
+ ✔ Basic fts with shorthand notation (3.638244ms)
281
+ ✔ Exists with shortest path wildcard filter example (4.177747ms)
282
+ ✔ Exists with exact path filter example (1.89645ms)
283
+ ✔ Not Exists with exact path filter example (1.866821ms)
284
+ ✔ Upsert example (16.813461ms)
285
+ ✔ Joins example (2.801722ms)
286
+ ✔ Joins repeating table example (4.918893ms)
287
+ ✔ Join aggregate functions example (10.451237ms)
288
+ ✔ $rowhash example (8.339682ms)
289
+ ✔ Reference column nested insert (9.995301ms)
290
+ ✔ Join escaped table names with quotes (17.985235ms)
291
+ Pushing 0 rows to socket x2
292
+ Client log (client) t+ 47866ms {
293
+ "item": {
294
+ "\"id0\"": 1,
295
+ "\"quoted1_id\"": 1,
296
+ "\"text_col0\"": "0"
297
+ },
298
+ "runs": 0
299
+ }
300
+ Client log (client) t+ 47874ms {
301
+ "item": {
302
+ "\"id0\"": 1,
303
+ "\"quoted1_id\"": 1,
304
+ "\"text_col0\"": "1"
305
+ },
306
+ "runs": 1
307
+ }
308
+ Client log unsubscribe start - """quoted0"""
309
+ Client log unsubscribe end - """quoted0"""
310
+ ✔ subscribe to escaped table name (18.234904ms)
311
+ Pushing 1 rows to socket x2
312
+ ✔ subscribe using a filter bigger than block_size (16.207513ms)
313
+ ✔ Reverse join with agg (12.175041ms)
314
+ Pushing 0 rows to socket
315
+ Client log {"_rows":[{"id":1,"t1":null,"tr2":[{"id":1,"tr1_id":1,"t1":"a","t2":"b"}],"tr3":[]},{"id":2,"t1":null,"tr2":[{"id":2,"tr1_id":2,"t1":"a","t2":"b"}],"tr3":[]}],"runs":1}
316
+ Client log {"_rows":[{"id":1,"t1":null,"tr2":[{"id":1,"tr1_id":1,"t1":"a","t2":"b"},{"id":3,"tr1_id":1,"t1":"a","t2":"b"}],"tr3":[]},{"id":2,"t1":null,"tr2":[{"id":2,"tr1_id":2,"t1":"a","t2":"b"}],"tr3":[]}],"runs":2}
317
+ ✔ Related table subscribe (9039.367762ms)
318
+ Pushing 2 rows to socket x2
319
+ ✔ Aggregate FILTER registers joined dependency triggers (666.714787ms)
320
+ ✔ Nested sort by computed col (8.733062ms)
321
+ ✔ Nested function on different than source column getNewQuery name bug fix (3.46051ms)
322
+ ✔ Reference column deep nested insert (23.843546ms)
323
+ ✔ Multi reference column nested insert (21.790808ms)
324
+ ✔ Join path with order by nested (12.891739ms)
325
+ ✔ Self join (13.14739ms)
326
+ ✔ One to many multi join duplicate row bug fix (10.343176ms)
327
+ Client log (client) t+ 57710ms various id=99 count 1
328
+ Pushing 1 rows to socket x3
329
+ Client log (client) t+ 57713ms various id=99 count
330
+ Client log ok
331
+ Error within running subscription
332
+ _psqlWS_..various.{"id":99}.{"select":{"name":1}}.m.sub {
333
+ message: 'column prostgles_root_table_alias.name does not exist',
334
+ length: 130,
335
+ name: 'error',
336
+ severity: 'ERROR',
337
+ code: '42703',
338
+ position: '133',
339
+ file: 'parse_relation.c',
340
+ line: '3716',
341
+ routine: 'errorMissingColumn',
342
+ query: '-- prostgles query id: 25202a99-232d-479a-a0c3-f5d6b9192753\n' +
343
+ 'SET LOCAL "prostgles.user" \n' +
344
+ `TO '{"id":"1","type":"public"}';\n` +
345
+ 'SELECT \n' +
346
+ ' "prostgles_root_table_alias"."name" AS "name" \n' +
347
+ ' FROM ( \n' +
348
+ ' SELECT * \n' +
349
+ ' FROM various \n' +
350
+ ' WHERE "id" = 99 \n' +
351
+ ' ) prostgles_root_table_alias \n' +
352
+ ' LIMIT 1000',
353
+ code_info: 'undefined_column'
354
+ }
355
+ Client log (client) t+ 59735ms various id=99 count
356
+ Client log (client) t+ 59736ms Error in subscription callback: {"message":"column prostgles_root_table_alias.name does not exist","length":130,"name":"error","severity":"ERROR","code":"42703","position":"133","file":"parse_relation.c","line":"3716","routine":"errorMissingColumn","query":"-- prostgles query id: 25202a99-232d-479a-a0c3-f5d6b9192753\nSET LOCAL \"prostgles.user\" \nTO '{\"id\":\"1\",\"type\":\"public\"}';\nSELECT \n \"prostgles_root_table_alias\".\"name\" AS \"name\" \n FROM ( \n SELECT * \n FROM various \n WHERE \"id\" = 99 \n ) prostgles_root_table_alias \n LIMIT 1000","code_info":"undefined_column"}
357
+ Client log ok
358
+ ✔ subscribe triggers with stale schema should fail gracefully and never block other queries (6549.757048ms)
359
+ ✔ Isomorphic queries (64059.692449ms)
360
+ ✔ Having clause (3.761579ms)
361
+ ✔ Having clause with complex filter (2.496705ms)
362
+ Client log (client) t+ 64272ms auth.user: {"sid":"main","uid":"1","id":"1","type":"public"}
363
+ ✔ Nested join having clause (4.216252ms)
364
+ ▶ isomorphic typed queries
365
+ ✔ isLookupTable DB Types from colConf (0.244693ms)
366
+ ✔ isLookupTable DB Types from reference column actual definition (0.153667ms)
367
+ ✔ isLookupTable pkey column itself is typed (0.15964ms)
368
+ ✔ isomorphic typed queries (0.777278ms)
369
+ ▶ Client only queries
370
+ ✔ modifyClientSchema adds custom table and column metadata (3.744106ms)
371
+ ✔ SQL Stream more than 1k records (23.038743ms)
372
+ ✔ SQL Stream persistedConnection with streamLimit works for subsequent queries (14.341967ms)
373
+ ✔ SQL Stream ensure the connection is never released (same pg_backend_pid is the same for subsequent) when using persistConnectionId (10.773051ms)
374
+ ✔ SQL Stream stop kills the query (1027.932092ms)
375
+ ✔ SQL Stream limit works (38.247663ms)
376
+ ✔ SQL Stream stop with terminate kills the query (expect flakiness) (139.817719ms)
377
+ ✔ SQL Stream (17.401463ms)
378
+ ✔ SQL Stream parallel execution + parameters (14.191616ms)
379
+ ✔ SQL Stream query error structure matches default sql run error (12.477706ms)
380
+ ✔ SQL Stream streamLimit (12.211167ms)
381
+ ✔ SQL Stream table fields are the same as on default request (18.250403ms)
382
+ ✔ SQL Stream works for multiple statements (11.676112ms)
383
+ Client log (client) t+ 65642ms Checking public data
384
+ ✔ Check tableSchema (23.268998ms)
385
+ ✔ Security rules example (29.909883ms)
386
+ Client log (client) t+ 65684ms Started testRealtime
387
+ Client log (client) t+ 65707ms 1790259792533: sub stats: x10 -> 0 x20 ->0
388
+ Client log (client) t+ 65715ms 1790259792541: sync stats: x10 -> 0 x20 -> 0
389
+ Client log (client) t+ 65715ms 1790259792541: sync: p.$update({ x: 10 }); (id: 0)
390
+ Client log (client) t+ 65715ms 1790259792541: sync: p.$update({ x: 10 }); (id: 1)
391
+ Client log (client) t+ 65715ms 1790259792541: sync: p.$update({ x: 10 }); (id: 2)
392
+ Client log (client) t+ 65715ms 1790259792541: sync: p.$update({ x: 10 }); (id: 3)
393
+ Client log (client) t+ 65715ms 1790259792541: sync: p.$update({ x: 10 }); (id: 4)
394
+ Client log (client) t+ 65715ms 1790259792541: sync: p.$update({ x: 10 }); (id: 5)
395
+ Client log (client) t+ 65715ms 1790259792541: sync: p.$update({ x: 10 }); (id: 6)
396
+ Client log (client) t+ 65715ms 1790259792541: sync: p.$update({ x: 10 }); (id: 7)
397
+ Client log (client) t+ 65715ms 1790259792541: sync: p.$update({ x: 10 }); (id: 8)
398
+ Client log (client) t+ 65715ms 1790259792541: sync: p.$update({ x: 10 }); (id: 9)
399
+ Client log (client) t+ 65715ms 1790259792541: sync: p.$update({ x: 10 }); (id: 10)
400
+ Client log (client) t+ 65715ms 1790259792541: sync: p.$update({ x: 10 }); (id: 11)
401
+ Client log (client) t+ 65715ms 1790259792541: sync: p.$update({ x: 10 }); (id: 12)
402
+ Client log (client) t+ 65715ms 1790259792541: sync: p.$update({ x: 10 }); (id: 13)
403
+ Client log (client) t+ 65715ms 1790259792541: sync: p.$update({ x: 10 }); (id: 14)
404
+ Client log (client) t+ 65715ms 1790259792541: sync: p.$update({ x: 10 }); (id: 15)
405
+ Client log (client) t+ 65715ms 1790259792541: sync: p.$update({ x: 10 }); (id: 16)
406
+ Client log (client) t+ 65716ms 1790259792542: sync: p.$update({ x: 10 }); (id: 17)
407
+ Client log (client) t+ 65716ms 1790259792542: sync: p.$update({ x: 10 }); (id: 18)
408
+ Client log (client) t+ 65716ms 1790259792542: sync: p.$update({ x: 10 }); (id: 19)
409
+ Client log (client) t+ 65716ms 1790259792542: sync: p.$update({ x: 10 }); (id: 20)
410
+ Client log (client) t+ 65716ms 1790259792542: sync: p.$update({ x: 10 }); (id: 21)
411
+ Client log (client) t+ 65716ms 1790259792542: sync: p.$update({ x: 10 }); (id: 22)
412
+ Client log (client) t+ 65716ms 1790259792542: sync: p.$update({ x: 10 }); (id: 23)
413
+ Client log (client) t+ 65716ms 1790259792542: sync: p.$update({ x: 10 }); (id: 24)
414
+ Client log (client) t+ 65716ms 1790259792542: sync: p.$update({ x: 10 }); (id: 25)
415
+ Client log (client) t+ 65716ms 1790259792542: sync: p.$update({ x: 10 }); (id: 26)
416
+ Client log (client) t+ 65716ms 1790259792542: sync: p.$update({ x: 10 }); (id: 27)
417
+ Client log (client) t+ 65716ms 1790259792542: sync: p.$update({ x: 10 }); (id: 28)
418
+ Client log (client) t+ 65716ms 1790259792542: sync: p.$update({ x: 10 }); (id: 29)
419
+ Client log (client) t+ 65716ms 1790259792542: sync: p.$update({ x: 10 }); (id: 30)
420
+ Client log (client) t+ 65716ms 1790259792542: sync: p.$update({ x: 10 }); (id: 31)
421
+ Client log (client) t+ 65716ms 1790259792542: sync: p.$update({ x: 10 }); (id: 32)
422
+ Client log (client) t+ 65716ms 1790259792542: sync: p.$update({ x: 10 }); (id: 33)
423
+ Client log (client) t+ 65716ms 1790259792542: sync: p.$update({ x: 10 }); (id: 34)
424
+ Client log (client) t+ 65716ms 1790259792542: sync: p.$update({ x: 10 }); (id: 35)
425
+ Client log (client) t+ 65716ms 1790259792542: sync: p.$update({ x: 10 }); (id: 36)
426
+ Client log (client) t+ 65716ms 1790259792542: sync: p.$update({ x: 10 }); (id: 37)
427
+ Client log (client) t+ 65716ms 1790259792542: sync: p.$update({ x: 10 }); (id: 38)
428
+ Client log (client) t+ 65716ms 1790259792542: sync: p.$update({ x: 10 }); (id: 39)
429
+ Client log (client) t+ 65716ms 1790259792542: sync: p.$update({ x: 10 }); (id: 40)
430
+ Client log (client) t+ 65716ms 1790259792542: sync: p.$update({ x: 10 }); (id: 41)
431
+ Client log (client) t+ 65716ms 1790259792542: sync: p.$update({ x: 10 }); (id: 42)
432
+ Client log (client) t+ 65716ms 1790259792542: sync: p.$update({ x: 10 }); (id: 43)
433
+ Client log (client) t+ 65716ms 1790259792542: sync: p.$update({ x: 10 }); (id: 44)
434
+ Client log (client) t+ 65716ms 1790259792542: sync: p.$update({ x: 10 }); (id: 45)
435
+ Client log (client) t+ 65716ms 1790259792542: sync: p.$update({ x: 10 }); (id: 46)
436
+ Client log (client) t+ 65716ms 1790259792542: sync: p.$update({ x: 10 }); (id: 47)
437
+ Client log (client) t+ 65716ms 1790259792542: sync: p.$update({ x: 10 }); (id: 48)
438
+ Client log (client) t+ 65716ms 1790259792542: sync: p.$update({ x: 10 }); (id: 49)
439
+ Pushing 0 rows to socket x3
440
+ upsertData (from client): inserted( 0 ) updated( 50 ) total( 50 )
441
+ last insert undefined
442
+ last update {"id":49,"x":10,"y":49,"flight_number":"FN49","last_updated":1790259792542}
443
+ Client log (client) t+ 65788ms 1790259792614: sub stats: x10 -> 50 x20 ->0
444
+ Pushing 50 rows to socket
445
+ upsertData (from client): inserted( 0 ) updated( 0 ) total( 50 )
446
+ last insert undefined
447
+ last update undefined
448
+ server.syncBatch planes: inserted( 0 ) updated( 50 ) deleted( 0 ) pushed to client( 50 ) total( 100 ) undefined
449
+ Client log (client) t+ 65800ms 1790259792626: sync stats: x10 -> 50 x20 -> 0
450
+ Client log (client) t+ 65800ms 1790259792626: sync: p.$update({ x: 10 }); (id: 50)
451
+ Client log (client) t+ 65800ms 1790259792626: sync: p.$update({ x: 10 }); (id: 51)
452
+ Client log (client) t+ 65800ms 1790259792626: sync: p.$update({ x: 10 }); (id: 52)
453
+ Client log (client) t+ 65800ms 1790259792626: sync: p.$update({ x: 10 }); (id: 53)
454
+ Client log (client) t+ 65800ms 1790259792626: sync: p.$update({ x: 10 }); (id: 54)
455
+ Client log (client) t+ 65800ms 1790259792626: sync: p.$update({ x: 10 }); (id: 55)
456
+ Client log (client) t+ 65800ms 1790259792626: sync: p.$update({ x: 10 }); (id: 56)
457
+ Client log (client) t+ 65800ms 1790259792626: sync: p.$update({ x: 10 }); (id: 57)
458
+ Client log (client) t+ 65800ms 1790259792626: sync: p.$update({ x: 10 }); (id: 58)
459
+ Client log (client) t+ 65800ms 1790259792626: sync: p.$update({ x: 10 }); (id: 59)
460
+ Client log (client) t+ 65800ms 1790259792626: sync: p.$update({ x: 10 }); (id: 60)
461
+ Client log (client) t+ 65800ms 1790259792626: sync: p.$update({ x: 10 }); (id: 61)
462
+ Client log (client) t+ 65800ms 1790259792626: sync: p.$update({ x: 10 }); (id: 62)
463
+ Client log (client) t+ 65800ms 1790259792626: sync: p.$update({ x: 10 }); (id: 63)
464
+ Client log (client) t+ 65800ms 1790259792626: sync: p.$update({ x: 10 }); (id: 64)
465
+ Client log (client) t+ 65800ms 1790259792626: sync: p.$update({ x: 10 }); (id: 65)
466
+ Client log (client) t+ 65800ms 1790259792626: sync: p.$update({ x: 10 }); (id: 66)
467
+ Client log (client) t+ 65800ms 1790259792626: sync: p.$update({ x: 10 }); (id: 67)
468
+ Client log (client) t+ 65800ms 1790259792626: sync: p.$update({ x: 10 }); (id: 68)
469
+ Client log (client) t+ 65800ms 1790259792626: sync: p.$update({ x: 10 }); (id: 69)
470
+ Client log (client) t+ 65800ms 1790259792626: sync: p.$update({ x: 10 }); (id: 70)
471
+ Client log (client) t+ 65800ms 1790259792626: sync: p.$update({ x: 10 }); (id: 71)
472
+ Client log (client) t+ 65800ms 1790259792626: sync: p.$update({ x: 10 }); (id: 72)
473
+ Client log (client) t+ 65800ms 1790259792626: sync: p.$update({ x: 10 }); (id: 73)
474
+ Client log (client) t+ 65801ms 1790259792627: sync: p.$update({ x: 10 }); (id: 74)
475
+ Client log (client) t+ 65801ms 1790259792627: sync: p.$update({ x: 10 }); (id: 75)
476
+ Client log (client) t+ 65801ms 1790259792627: sync: p.$update({ x: 10 }); (id: 76)
477
+ Client log (client) t+ 65801ms 1790259792627: sync: p.$update({ x: 10 }); (id: 77)
478
+ Client log (client) t+ 65801ms 1790259792627: sync: p.$update({ x: 10 }); (id: 78)
479
+ Client log (client) t+ 65801ms 1790259792627: sync: p.$update({ x: 10 }); (id: 79)
480
+ Client log (client) t+ 65801ms 1790259792627: sync: p.$update({ x: 10 }); (id: 80)
481
+ Client log (client) t+ 65801ms 1790259792627: sync: p.$update({ x: 10 }); (id: 81)
482
+ Client log (client) t+ 65801ms 1790259792627: sync: p.$update({ x: 10 }); (id: 82)
483
+ Client log (client) t+ 65801ms 1790259792627: sync: p.$update({ x: 10 }); (id: 83)
484
+ Client log (client) t+ 65801ms 1790259792627: sync: p.$update({ x: 10 }); (id: 84)
485
+ Client log (client) t+ 65801ms 1790259792627: sync: p.$update({ x: 10 }); (id: 85)
486
+ Client log (client) t+ 65801ms 1790259792627: sync: p.$update({ x: 10 }); (id: 86)
487
+ Client log (client) t+ 65801ms 1790259792627: sync: p.$update({ x: 10 }); (id: 87)
488
+ Client log (client) t+ 65801ms 1790259792627: sync: p.$update({ x: 10 }); (id: 88)
489
+ Client log (client) t+ 65801ms 1790259792627: sync: p.$update({ x: 10 }); (id: 89)
490
+ Client log (client) t+ 65801ms 1790259792627: sync: p.$update({ x: 10 }); (id: 90)
491
+ Client log (client) t+ 65801ms 1790259792627: sync: p.$update({ x: 10 }); (id: 91)
492
+ Client log (client) t+ 65801ms 1790259792627: sync: p.$update({ x: 10 }); (id: 92)
493
+ Client log (client) t+ 65801ms 1790259792627: sync: p.$update({ x: 10 }); (id: 93)
494
+ Client log (client) t+ 65801ms 1790259792627: sync: p.$update({ x: 10 }); (id: 94)
495
+ Client log (client) t+ 65801ms 1790259792627: sync: p.$update({ x: 10 }); (id: 95)
496
+ Client log (client) t+ 65801ms 1790259792627: sync: p.$update({ x: 10 }); (id: 96)
497
+ Client log (client) t+ 65801ms 1790259792627: sync: p.$update({ x: 10 }); (id: 97)
498
+ Client log (client) t+ 65801ms 1790259792627: sync: p.$update({ x: 10 }); (id: 98)
499
+ Client log (client) t+ 65801ms 1790259792627: sync: p.$update({ x: 10 }); (id: 99)
500
+ Client log (client) t+ 65804ms 1790259792630: sync stats: x10 -> 100 x20 -> 0
501
+ upsertData (from WAL): inserted( 0 ) updated( 0 ) total( 1 )
502
+ last insert undefined
503
+ last update undefined
504
+ upsertData (from WAL): inserted( 0 ) updated( 1 ) total( 50 )
505
+ last insert undefined
506
+ last update {"id":50,"x":10,"last_updated":1790259792626}
507
+ Client log (client) t+ 65930ms 1790259792756: sub stats: x10 -> 51 x20 ->0
508
+ Pushing 51 rows to socket
509
+ upsertData (from WAL): inserted( 0 ) updated( 49 ) total( 49 )
510
+ last insert undefined
511
+ last update {"id":99,"x":10,"last_updated":1790259792627}
512
+ Client log (client) t+ 66080ms 1790259792906: sub stats: x10 -> 100 x20 ->0
513
+ Client log (client) t+ 68081ms 1790259794907: sub: db.planes.update({}, { x: 20, last_updated });
514
+ Client log (client) t+ 68102ms 1790259794924: sub: Updated to x20 100
515
+ Pushing 100 rows to socket
516
+ Client log (client) t+ 68116ms 1790259794942: sync stats: x10 -> 50 x20 -> 50
517
+ Client log (client) t+ 68134ms 1790259794960: sync stats: x10 -> 0 x20 -> 100
518
+ ✔ Realtime (2463.521677ms)
519
+ Client log (client) t+ 68134ms 1790259794960: sync end: Finished replication test. Inserting 100 rows then updating two times took: 450ms
520
+ Client log (client) t+ 68136ms sync handlesOnData true 100
521
+ upsertData (from client): inserted( 0 ) updated( 0 ) total( 26 )
522
+ last insert undefined
523
+ last update undefined x2
524
+ server.syncBatch planes: inserted( 0 ) updated( 0 ) deleted( 0 ) pushed to client( 100 ) total( 100 ) undefined
525
+ ✔ sync handlesOnData true -> false no data bug (2001.24403ms)
526
+ ﹣ Security rules example (0.203744ms) # SKIP
527
+ ✔ Client only queries (5863.669613ms)
528
+ ▶ React hooks
529
+ ✔ useFind (526.446966ms)
530
+ {
531
+ message: 'items4.named is invalid/disallowed for filtering. Allowed columns: added, "id", "public", "name"'
532
+ }
533
+ ✔ useSubscribe (526.822965ms)
534
+ ✔ useFindOne (511.656308ms)
535
+ Pushing 1 rows to socket
536
+ {
537
+ message: 'items4.named is invalid/disallowed for filtering. Allowed columns: added, "id", "public", "name"'
538
+ }
539
+ ✔ useSubscribeOne (527.088532ms)
540
+ ✔ useCount (506.955417ms)
541
+ ✔ useSize (508.934036ms)
542
+ ✔ useCount planes (254.669225ms)
543
+ Pushing 2 rows to socket
544
+ upsertData (from client): inserted( 0 ) updated( 0 ) total( 50 )
545
+ last insert undefined
546
+ last update undefined
547
+ upsertData (from client): inserted( 0 ) updated( 0 ) total( 1 )
548
+ last insert undefined
549
+ last update undefined
550
+ server.syncBatch planes: inserted( 0 ) updated( 0 ) deleted( 0 ) pushed to client( 1 ) total( 1 ) undefined
551
+ Client log (client) t+ 73817ms 1790259800643: sync stats: x10 -> 0 x20 -> 99
552
+ upsertData (from client): inserted( 0 ) updated( 0 ) total( 50 )
553
+ last insert undefined
554
+ last update undefined
555
+ server.syncBatch planes: inserted( 0 ) updated( 0 ) deleted( 0 ) pushed to client( 2 ) total( 100 ) undefined
556
+ ✔ useSync (558.812934ms)
557
+ upsertData (from client): inserted( 0 ) updated( 0 ) total( 1 )
558
+ last insert undefined
559
+ last update undefined x2
560
+ server.syncBatch planes: inserted( 0 ) updated( 0 ) deleted( 0 ) pushed to client( 1 ) total( 1 ) undefined
561
+ Client log (client) t+ 74101ms 1790259800927: sync stats: x10 -> 0 x20 -> 100
562
+ Client log (client) t+ 74101ms 1790259800927: sync end: Finished replication test. Inserting 100 rows then updating two times took: 6417ms
563
+ server.syncBatch planes: inserted( 0 ) updated( 0 ) deleted( 0 ) pushed to client( 1 ) total( 1 ) undefined
564
+ Client log (client) t+ 74379ms 1790259801205: sync stats: x10 -> 0 x20 -> 99
565
+ upsertData (from client): inserted( 0 ) updated( 0 ) total( 1 )
566
+ last insert undefined
567
+ last update undefined
568
+ server.syncBatch planes: inserted( 0 ) updated( 0 ) deleted( 0 ) pushed to client( 1 ) total( 1 ) undefined
569
+ upsertData (from client): inserted( 0 ) updated( 0 ) total( 1 )
570
+ last insert undefined
571
+ last update undefined
572
+ server.syncBatch planes: inserted( 0 ) updated( 0 ) deleted( 0 ) pushed to client( 1 ) total( 1 ) undefined
573
+ ✔ useSync updates invalidate useMemo without mutating old data (369.651065ms)
574
+ upsertData (from WAL): inserted( 0 ) updated( 1 ) total( 1 )
575
+ last insert undefined
576
+ last update {"id":0,"x":232,"last_updated":1790259801234}
577
+ Client log (client) t+ 74450ms 1790259801276: sync stats: x10 -> 0 x20 -> 99
578
+ upsertData (from client): inserted( 0 ) updated( 0 ) total( 1 )
579
+ last insert undefined
580
+ last update undefined
581
+ server.syncBatch planes: inserted( 0 ) updated( 0 ) deleted( 0 ) pushed to client( 1 ) total( 1 ) undefined
582
+ upsertData (from client): inserted( 0 ) updated( 0 ) total( 1 )
583
+ last insert undefined
584
+ last update undefined
585
+ server.syncBatch planes: inserted( 0 ) updated( 0 ) deleted( 0 ) pushed to client( 1 ) total( 1 ) undefined
586
+ Client log (client) t+ 74750ms 1790259801576: sync stats: x10 -> 0 x20 -> 99
587
+ upsertData (from client): inserted( 0 ) updated( 0 ) total( 1 )
588
+ last insert undefined
589
+ last update undefined x2
590
+ server.syncBatch planes: inserted( 0 ) updated( 0 ) deleted( 0 ) pushed to client( 1 ) total( 1 ) undefined
591
+ server.syncBatch planes: inserted( 0 ) updated( 0 ) deleted( 0 ) pushed to client( 1 ) total( 1 ) undefined
592
+ upsertData (from WAL): inserted( 0 ) updated( 1 ) total( 1 )
593
+ last insert undefined
594
+ last update {"id":0,"x":32,"last_updated":1790259801577}
595
+ Client log (client) t+ 74766ms 1790259801592: sync stats: x10 -> 0 x20 -> 99
596
+ upsertData (from client): inserted( 0 ) updated( 0 ) total( 1 )
597
+ last insert undefined
598
+ last update undefined
599
+ server.syncBatch planes: inserted( 0 ) updated( 0 ) deleted( 0 ) pushed to client( 1 ) total( 1 ) undefined
600
+ ✔ concurrent useSync hooks with matching options all update (340.582932ms)
601
+ upsertData (from client): inserted( 0 ) updated( 0 ) total( 1 )
602
+ last insert undefined
603
+ last update undefined
604
+ server.syncBatch planes: inserted( 0 ) updated( 0 ) deleted( 0 ) pushed to client( 51 ) total( 52 ) undefined
605
+ Client log (client) t+ 75091ms Reconnected
606
+ Client log (client) t+ 75130ms TEST_NAME: main Started
607
+ upsertData (from client): inserted( 0 ) updated( 0 ) total( 50 )
608
+ last insert undefined
609
+ last update undefined
610
+ upsertData (from client): inserted( 0 ) updated( 0 ) total( 1 )
611
+ last insert undefined
612
+ last update undefined
613
+ server.syncBatch planes: inserted( 0 ) updated( 0 ) deleted( 0 ) pushed to client( 152 ) total( 202 ) undefined
614
+ Client log (client) t+ 75143ms 1790259801969: sync stats: x10 -> 1 x20 -> 100
615
+ Client log (client) t+ 75143ms 1790259801969: sync: p.$update({ x: 10 }); (id: 999000)
616
+ Client log (client) t+ 75143ms 1790259801969: sync: p.$update({ x: 10 }); (id: 999001)
617
+ Client log (client) t+ 75143ms 1790259801969: sync: p.$update({ x: 10 }); (id: 999002)
618
+ Client log (client) t+ 75143ms 1790259801969: sync: p.$update({ x: 10 }); (id: 999003)
619
+ Client log (client) t+ 75143ms 1790259801969: sync: p.$update({ x: 10 }); (id: 999004)
620
+ Client log (client) t+ 75143ms 1790259801969: sync: p.$update({ x: 10 }); (id: 999005)
621
+ Client log (client) t+ 75143ms 1790259801969: sync: p.$update({ x: 10 }); (id: 999006)
622
+ Client log (client) t+ 75143ms 1790259801969: sync: p.$update({ x: 10 }); (id: 999007)
623
+ Client log (client) t+ 75143ms 1790259801969: sync: p.$update({ x: 10 }); (id: 999008)
624
+ Client log (client) t+ 75143ms 1790259801969: sync end: Finished replication test. Inserting 100 rows then updating two times took: 7459ms
625
+ Client log (client) t+ 75147ms 1790259801973: sync stats: x10 -> 10 x20 -> 100
626
+ Client log (client) t+ 75147ms 1790259801973: sync end: Finished replication test. Inserting 100 rows then updating two times took: 7463ms
627
+ server.syncBatch planes: inserted( 0 ) updated( 0 ) deleted( 0 ) pushed to client( 52 ) total( 53 ) undefined
628
+ upsertData (from WAL): inserted( 0 ) updated( 1 ) total( 1 )
629
+ last insert undefined
630
+ last update {"id":999000,"x":10,"last_updated":1790259801969}
631
+ (server): Client disconnected. socket.id: JbMkuJlFI_J2cVHkAAAA
632
+ onSocketConnect op_RM59F8vRTOp6SAAAB
633
+ (server): Client connected -> console does not work. use log function. socket.id: op_RM59F8vRTOp6SAAAB
634
+ Client log (client) t+ 75158ms Disconnected
635
+ Client log (client) t+ 76247ms Client connect.
636
+ schemaChanged must syncHandler.destroySyncs()
637
+ Client log (client) t+ 76351ms Reconnected
638
+ upsertData (from client): inserted( 0 ) updated( 0 ) total( 1 )
639
+ last insert undefined
640
+ last update undefined
641
+ Client log (client) t+ 76378ms TEST_NAME: main Started
642
+ upsertData (from client): inserted( 0 ) updated( 0 ) total( 50 )
643
+ last insert undefined
644
+ last update undefined
645
+ server.syncBatch planes: inserted( 0 ) updated( 0 ) deleted( 0 ) pushed to client( 153 ) total( 203 ) undefined
646
+ Client log (client) t+ 76388ms 1790259803214: sync stats: x10 -> 2 x20 -> 100
647
+ Client log (client) t+ 76388ms 1790259803214: sync: p.$update({ x: 10 }); (id: 999001)
648
+ Client log (client) t+ 76388ms 1790259803214: sync: p.$update({ x: 10 }); (id: 999002)
649
+ Client log (client) t+ 76388ms 1790259803214: sync: p.$update({ x: 10 }); (id: 999003)
650
+ Client log (client) t+ 76388ms 1790259803214: sync: p.$update({ x: 10 }); (id: 999004)
651
+ Client log (client) t+ 76388ms 1790259803214: sync: p.$update({ x: 10 }); (id: 999005)
652
+ Client log (client) t+ 76388ms 1790259803214: sync: p.$update({ x: 10 }); (id: 999006)
653
+ Client log (client) t+ 76388ms 1790259803214: sync: p.$update({ x: 10 }); (id: 999007)
654
+ Client log (client) t+ 76388ms 1790259803214: sync: p.$update({ x: 10 }); (id: 999008)
655
+ Client log (client) t+ 76388ms 1790259803214: sync end: Finished replication test. Inserting 100 rows then updating two times took: 8704ms
656
+ Client log (client) t+ 76392ms 1790259803218: sync stats: x10 -> 10 x20 -> 100
657
+ Client log (client) t+ 76393ms 1790259803219: sync end: Finished replication test. Inserting 100 rows then updating two times took: 8709ms
658
+ upsertData (from client): inserted( 0 ) updated( 0 ) total( 1 )
659
+ last insert undefined
660
+ last update undefined
661
+ server.syncBatch planes: inserted( 0 ) updated( 0 ) deleted( 0 ) pushed to client( 53 ) total( 54 ) undefined
662
+ upsertData (from WAL): inserted( 0 ) updated( 1 ) total( 1 )
663
+ last insert undefined
664
+ last update {"id":999001,"x":10,"last_updated":1790259803214}
665
+ ✔ concurrent useSync hooks receive inserts after reattachment and reconnect (1651.92501ms)
666
+ ✔ React hooks (6284.720796ms)
667
+ Client log (client) t+ 76423ms TEST_NAME: main Finished OK
668
+ upsertData (from client): inserted( 0 ) updated( 0 ) total( 1 )
669
+ last insert undefined
670
+ last update undefined
671
+ server.syncBatch planes: inserted( 0 ) updated( 0 ) deleted( 0 ) pushed to client( 1 ) total( 2 ) undefined
672
+ upsertData (from WAL): inserted( 0 ) updated( 7 ) total( 7 )
673
+ last insert undefined
674
+ last update {"id":999008,"x":10,"last_updated":1790259803214}
675
+ upsertData (from client): inserted( 0 ) updated( 0 ) total( 1 )
676
+ last insert undefined
677
+ last update undefined
678
+ server.syncBatch planes: inserted( 0 ) updated( 0 ) deleted( 0 ) pushed to client( 7 ) total( 8 ) undefined
679
+ Client test successful
680
+ (server): Stopping server ...
681
+ ℹ tests 122
682
+ ℹ suites 4
683
+ ℹ pass 121
684
+ ℹ fail 0
685
+ ℹ cancelled 0
686
+ ℹ skipped 1
687
+ ℹ todo 0
688
+ ℹ duration_ms 83658.425718