Skip to content

Commit d05c818

Browse files
committed
enable subscriptions tests
1 parent 5e7d97f commit d05c818

File tree

6 files changed

+8
-19
lines changed

6 files changed

+8
-19
lines changed

test/Ported/PatchTest.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ describe("PatchTest", function () {
9393
}
9494
});
9595

96-
it("throws on invalid script", async () => {
96+
it("throws on invalid script", async function () {
9797
{
9898
const session = store.openSession();
9999
const user = new User();

test/Ported/Subscriptions/RevisionsSubscriptionsTest.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,10 @@ import { RevisionsConfiguration } from "../../../src/Documents/Operations/Revisi
1010
import { ConfigureRevisionsOperation } from "../../../src/Documents/Operations/Revisions/ConfigureRevisionsOperation";
1111
import * as assert from "assert";
1212

13-
const is41 = process.env["RAVENDB_SERVER_VERSION"] === "4.1";
14-
1513
// skipped for the time being
1614
// subscriptions are not working with server version 4.1
1715
// due to RavenDB-12127
18-
(is41 ? describe.skip : describe)("RevisionsSubscriptionsTest", function () {
16+
describe("RevisionsSubscriptionsTest", function () {
1917
this.timeout(5 * 10 * 1000);
2018

2119
let store: IDocumentStore;

test/Ported/Subscriptions/SecuredSubscriptionsBasicTest.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,7 @@ import {
88
} from "../../../src";
99
import { AsyncQueue } from "../../Utils/AsyncQueue";
1010

11-
const is41 = process.env["RAVENDB_SERVER_VERSION"] === "4.1";
12-
13-
// skipped for the time being
14-
// subscriptions are not working with server version 4.1
15-
// due to RavenDB-12127
16-
(is41 ? describe.skip : describe)("SecuredSubscriptionsBasicTest", function () {
11+
describe("SecuredSubscriptionsBasicTest", function () {
1712
const _reasonableWaitTime = 5 * 1000;
1813
this.timeout(5 * _reasonableWaitTime);
1914

test/Ported/Subscriptions/SubscriptionsBasicTest.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,7 @@ import { getError, throwError } from "../../../src/Exceptions";
1616
import { TypeUtil } from "../../../src/Utility/TypeUtil";
1717
import { delay } from "bluebird";
1818

19-
const is41 = process.env["RAVENDB_SERVER_VERSION"] === "4.1";
20-
21-
// skipped for the time being
22-
// subscriptions are not working with server version 4.1
23-
// due to RavenDB-12127
24-
(is41 ? describe.skip : describe)("SubscriptionsBasicTest", function () {
19+
describe("SubscriptionsBasicTest", function () {
2520
const _reasonableWaitTime = 5 * 1000;
2621
this.timeout(5 * _reasonableWaitTime);
2722

test/Utils/TestUtil.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import "../../src/Utility/Polyfills";
1717
import { IDocumentSession } from "../../src";
1818

1919
// logOnUncaughtAndUnhandled();
20-
const is41 = process.env["RAVENDB_SERVER_VERSION"] === "4.1";
2120

2221
function logOnUncaughtAndUnhandled() {
2322
process.on("unhandledRejection", (...args) => {
@@ -38,7 +37,7 @@ class TestServiceLocator extends RavenServerLocator {
3837
"--ServerUrl.Tcp=tcp://127.0.0.1:38884",
3938
];
4039

41-
if (is41) {
40+
if (process.env["RAVENDB_SERVER_VERSION"] === "4.1") {
4241
cliOpts.push("--Features.Availability=Experimental");
4342
}
4443

@@ -123,6 +122,8 @@ export class RavenTestContext extends RavenTestDriver implements IDisposable {
123122
typeof(process.env["TRAVIS_PULL_REQUEST"]) === "undefined" ||
124123
process.env["TRAVIS_PULL_REQUEST"] === "false") === false;
125124

125+
public static is41 = process.env["RAVENDB_SERVER_VERSION"] === "4.1";
126+
126127
public static setupServer(): RavenTestContext {
127128
return new RavenTestContext(new TestServiceLocator(), new TestSecuredServiceLocator());
128129
}

test/mocha.opts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
--recursive
2-
--timeout 15000
2+
--timeout 20000
33
--slow 1000

0 commit comments

Comments
 (0)