Skip to content

Commit fb3c01a

Browse files
committed
using UTC time
increased timeouts bumped packages + dropping node 10.x
1 parent f1ebd74 commit fb3c01a

25 files changed

+723
-470
lines changed

.github/workflows/RavenClient.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ jobs:
2424

2525
strategy:
2626
matrix:
27-
node-version: [10.x, 12.x, 14.x, 16.x]
28-
serverVersion: ["5.2"]
27+
node-version: [12.x, 14.x, 16.x]
28+
serverVersion: ["5.2", "5.3"]
2929
fail-fast: false
3030

3131
steps:

package-lock.json

Lines changed: 558 additions & 310 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -54,26 +54,26 @@
5454
"author": "Hibernating Rhinos",
5555
"license": "MIT",
5656
"devDependencies": {
57-
"@types/bluebird": "^3.5.33",
58-
"@types/md5": "^2.2.1",
59-
"@types/mocha": "^8.0.4",
60-
"@types/pluralize": "0.0.27",
61-
"@types/rimraf": "^3.0.0",
62-
"@types/sinon": "^9.0.8",
63-
"@types/unzipper": "^0.10.3",
57+
"@types/bluebird": "^3.5.36",
58+
"@types/md5": "^2.3.1",
59+
"@types/mocha": "^9.0.0",
60+
"@types/pluralize": "0.0.29",
61+
"@types/rimraf": "^3.0.2",
62+
"@types/sinon": "^10.0.6",
63+
"@types/unzipper": "^0.10.4",
6464
"@types/util.promisify": "^1.0.4",
6565
"@types/ws": "^7.4.0",
6666
"cross-os": "^1.3.0",
67-
"glob": "^7.1.6",
67+
"glob": "^7.2.0",
6868
"http-proxy-agent": "^4.0.1",
6969
"lodash.orderby": "^4.6.0",
70-
"mocha": "^8.2.1",
70+
"mocha": "^9.1.3",
7171
"nyc": "^15.1.0",
7272
"open": "^7.3.0",
7373
"rimraf": "^3.0.2",
74-
"sinon": "^9.2.1",
75-
"source-map-support": "^0.5.19",
76-
"ts-node": "^9.0.0",
74+
"sinon": "^12.0.1",
75+
"source-map-support": "^0.5.21",
76+
"ts-node": "^10.4.0",
7777
"tslint": "^6.1.3",
7878
"tslint-eslint-rules": "^5.4.0",
7979
"tslint-microsoft-contrib": "^6.2.0",
@@ -82,30 +82,30 @@
8282
},
8383
"dependencies": {
8484
"@types/node-fetch": "^2.5.7",
85-
"@types/qs": "^6.9.5",
85+
"@types/qs": "^6.9.7",
8686
"@types/semaphore": "^1.1.0",
87-
"@types/stream-json": "^1.5.1",
88-
"@types/uuid": "^8.3.0",
89-
"@types/verror": "^1.10.4",
87+
"@types/stream-json": "^1.7.1",
88+
"@types/uuid": "^8.3.3",
89+
"@types/verror": "^1.10.5",
9090
"abort-controller": "^3.0.0",
9191
"bluebird": "^3.7.2",
9292
"change-case": "^3.1.0",
9393
"deprecate": "^1.1.1",
9494
"md5": "^2.3.0",
9595
"moment": "^2.29.1",
9696
"node-fetch": "^2.6.1",
97-
"object.entries": "^1.1.2",
98-
"object.values": "^1.1.1",
97+
"object.entries": "^1.1.5",
98+
"object.values": "^1.1.5",
9999
"pluralize": "^4.0.0",
100-
"qs": "^6.9.4",
100+
"qs": "^6.10.1",
101101
"readable-stream": "^3.6.0",
102102
"safe-memory-cache": "^2.0.0",
103103
"semaphore": "^1.1.0",
104-
"stream-json": "^1.7.1",
104+
"stream-json": "^1.7.3",
105105
"util.promisify": "^1.0.1",
106106
"uuid": "^8.3.1",
107-
"verror": "^1.10.0",
108-
"ws": "^7.4.0",
107+
"verror": "^1.10.1",
108+
"ws": "^7.5.5",
109109
"xregexp": "^4.4.0"
110110
}
111111
}

test/Issues/RDBC_501.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ describe("RDBC-501", function () {
3535

3636
it("should properly map typed entries", async function () {
3737

38-
const baseLine = moment().startOf("day");
38+
const baseLine = testContext.utcToday();
3939

4040
{
4141
const session = store.openSession();

test/Ported/FilteredReplicationTest.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -177,10 +177,10 @@ import { GetReplicationHubAccessOperation } from "../../src/Documents/Operations
177177
.increment("test");
178178

179179
s.timeSeriesFor("users/pheobe", HeartRateMeasure)
180-
.append(moment().startOf("day").toDate(), HeartRateMeasure.create(34), "test/things/out");
180+
.append(testContext.utcToday().toDate(), HeartRateMeasure.create(34), "test/things/out");
181181

182182
s.timeSeriesFor("users/ayende", HeartRateMeasure)
183-
.append(moment().startOf("day").toDate(), HeartRateMeasure.create(55), "test/things/out");
183+
.append(testContext.utcToday().toDate(), HeartRateMeasure.create(55), "test/things/out");
184184

185185
s.advanced.attachments.store("users/ayende", "test.bin", Buffer.from("hello"));
186186
s.advanced.attachments.store("users/pheobe", "test.bin", Buffer.from("hello"));
@@ -260,7 +260,7 @@ import { GetReplicationHubAccessOperation } from "../../src/Documents/Operations
260260
const s = storeB.openSession();
261261
assertThat(await s.load("users/pheobe"))
262262
.isNull();
263-
assertThat(await s.advanced.revisions.get("users/pheobe", moment().startOf("day").add(1, "day").toDate()))
263+
assertThat(await s.advanced.revisions.get("users/pheobe", testContext.utcToday().add(1, "day").toDate()))
264264
.isNull();
265265
assertThat(await s.countersFor("users/pheobe").get("test"))
266266
.isNull();
@@ -273,7 +273,7 @@ import { GetReplicationHubAccessOperation } from "../../src/Documents/Operations
273273
.isNotNull();
274274
assertThat(await s.load("users/ayende", User))
275275
.isNotNull();
276-
assertThat(await s.advanced.revisions.get("users/ayende", moment().startOf("day").add(1, "day").toDate()))
276+
assertThat(await s.advanced.revisions.get("users/ayende", testContext.utcToday().add(1, "day").toDate()))
277277
.isNotNull();
278278
assertThat(await s.countersFor("users/ayende").get("test"))
279279
.isNotNull();
@@ -303,7 +303,7 @@ import { GetReplicationHubAccessOperation } from "../../src/Documents/Operations
303303
assertThat(await s.load("users/ayende", User))
304304
.isNotNull();
305305

306-
assertThat(await s.advanced.revisions.get("users/ayende", moment().startOf("day").add(1, "day").toDate()))
306+
assertThat(await s.advanced.revisions.get("users/ayende", testContext.utcToday().add(1, "day").toDate()))
307307
.isNotNull();
308308

309309
assertThat(await s.countersFor("users/ayende").get("test"))
@@ -353,10 +353,10 @@ import { GetReplicationHubAccessOperation } from "../../src/Documents/Operations
353353
.increment("test");
354354

355355
s.timeSeriesFor("users/pheobe", HeartRateMeasure)
356-
.append(moment().startOf("day").toDate(), HeartRateMeasure.create(34), "test/things/out");
356+
.append(testContext.utcToday().toDate(), HeartRateMeasure.create(34), "test/things/out");
357357

358358
s.timeSeriesFor("users/ayende", HeartRateMeasure)
359-
.append(moment().startOf("day").toDate(), HeartRateMeasure.create(55), "test/things/out");
359+
.append(testContext.utcToday().toDate(), HeartRateMeasure.create(55), "test/things/out");
360360

361361
s.advanced.attachments.store("users/ayende", "test.bin", Buffer.from("hello"));
362362
s.advanced.attachments.store("users/pheobe", "test.bin", Buffer.from("hello"));
@@ -437,7 +437,7 @@ import { GetReplicationHubAccessOperation } from "../../src/Documents/Operations
437437
const s = storeB.openSession();
438438
assertThat(await s.load("users/pheobe", User))
439439
.isNull();
440-
assertThat(await s.advanced.revisions.get("users/pheobe", moment().startOf("day").add(1, "day").toDate()))
440+
assertThat(await s.advanced.revisions.get("users/pheobe", testContext.utcToday().add(1, "day").toDate()))
441441
.isNull();
442442
assertThat(await s.countersFor("users/pheobe").get("test"))
443443
.isNull();
@@ -451,7 +451,7 @@ import { GetReplicationHubAccessOperation } from "../../src/Documents/Operations
451451
.isNotNull();
452452
assertThat(await s.load("users/ayende", User))
453453
.isNotNull();
454-
assertThat(await s.advanced.revisions.get("users/ayende", moment().startOf("day").add(1, "day").toDate()))
454+
assertThat(await s.advanced.revisions.get("users/ayende", testContext.utcToday().add(1, "day").toDate()))
455455
.isNotNull();
456456
assertThat(await s.countersFor("users/ayende").get("test"))
457457
.isNotNull();
@@ -481,7 +481,7 @@ import { GetReplicationHubAccessOperation } from "../../src/Documents/Operations
481481
assertThat(await s.load("users/ayende", User))
482482
.isNotNull();
483483

484-
assertThat(await s.advanced.revisions.get("users/ayende", moment().startOf("day").add(1, "day").toDate()))
484+
assertThat(await s.advanced.revisions.get("users/ayende", testContext.utcToday().add(1, "day").toDate()))
485485
.isNotNull();
486486

487487
assertThat(await s.countersFor("users/ayende").get("test"))

test/Ported/Indexing/TimeSeriesIndexStreamTest.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ describe("TimeSeriesIndexStreamTest", function () {
1717
await disposeTestDocumentStore(store));
1818

1919
it("basicMapIndex", async () => {
20-
const now1 = moment().startOf("day");
20+
const now1 = testContext.utcToday();
2121
const now2 = now1.clone().add(1, "second");
2222

2323
{

test/Ported/Issues/RavenDB_14164.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ describe("RavenDB_14164Test", function () {
1818
it("canGetTimeSeriesWithIncludeTagDocuments", async () => {
1919
const tags = ["watches/fitbit", "watches/apple", "watches/sony"];
2020

21-
const baseLine = moment().startOf("day");
21+
const baseLine = testContext.utcToday();
2222

2323
const documentId = "users/ayende";
2424

@@ -105,7 +105,7 @@ describe("RavenDB_14164Test", function () {
105105
it("canGetTimeSeriesWithIncludeTagsAndParentDocument", async function () {
106106
const tags = ["watches/fitbit", "watches/apple", "watches/sony"];
107107

108-
const baseLine = moment().startOf("day");
108+
const baseLine = testContext.utcToday();
109109

110110
const documentId = "users/ayende";
111111

@@ -202,7 +202,7 @@ describe("RavenDB_14164Test", function () {
202202
it("canGetTimeSeriesWithInclude_CacheNotEmpty", async function() {
203203
const tags = ["watches/fitbit", "watches/apple", "watches/sony"];
204204

205-
const baseLine = moment().startOf("day");
205+
const baseLine = testContext.utcToday();
206206

207207
const documentId = "users/ayende";
208208

@@ -317,7 +317,7 @@ describe("RavenDB_14164Test", function () {
317317
it("canGetTimeSeriesWithInclude_CacheNotEmpty2", async function () {
318318
const tags = ["watches/fitbit", "watches/apple", "watches/sony"];
319319

320-
const baseLine = moment().startOf("day");
320+
const baseLine = testContext.utcToday();
321321

322322
const documentId = "users/ayende";
323323

@@ -445,7 +445,7 @@ describe("RavenDB_14164Test", function () {
445445
it("canGetMultipleRangesWithIncludes", async function () {
446446
const tags = [ "watches/fitbit", "watches/apple", "watches/sony" ];
447447

448-
const baseLine = moment().startOf("day");
448+
const baseLine = testContext.utcToday();
449449

450450
const documentId = "users/ayende";
451451

@@ -589,7 +589,7 @@ describe("RavenDB_14164Test", function () {
589589
it("canGetTimeSeriesWithIncludeTags_WhenNotAllEntriesHaveTags", async function () {
590590
const tags = ["watches/fitbit", "watches/apple", "watches/sony"];
591591

592-
const baseLine = moment().startOf("day");
592+
const baseLine = testContext.utcToday();
593593

594594
const documentId = "users/ayende";
595595

@@ -680,7 +680,7 @@ describe("RavenDB_14164Test", function () {
680680
it("includesShouldAffectTimeSeriesGetCommandEtag", async function () {
681681
const tags = ["watches/fitbit", "watches/apple", "watches/sony"];
682682

683-
const baseLine = moment().startOf("day");
683+
const baseLine = testContext.utcToday();
684684

685685
const documentId = "users/ayende";
686686

test/Ported/Issues/RavenDB_14994.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ describe("RavenDB_14994", function () {
3838
it("getOnEmptyRangeShouldReturnEmptyArray", async () => {
3939
const documentId = "users/ayende";
4040

41-
const baseLine = moment().startOf("day");
41+
const baseLine = testContext.utcToday();
4242

4343
{
4444
const session = store.openSession();

test/Ported/Issues/RavenDB_15029.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ describe("RavenDB_15029", function () {
1616
await disposeTestDocumentStore(store));
1717

1818
it("sessionRawQueryShouldNotTrackTimeSeriesResultAsDocument", async () => {
19-
const baseLine = moment().startOf("day");
19+
const baseLine = testContext.utcToday();
2020

2121
{
2222
const session = store.openSession();

test/Ported/Issues/RavenDB_15076.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import { ReplicationTestContext } from "../../Utils/ReplicationTestContext";
2424
});
2525

2626
it("counters_and_force_revisions", async () => {
27-
const today = moment().startOf("day");
27+
const today = testContext.utcToday();
2828

2929
{
3030
const storeA = await testContext.getDocumentStore();

0 commit comments

Comments
 (0)