Skip to content

Commit

Permalink
new nodejs record
Browse files Browse the repository at this point in the history
  • Loading branch information
alowenst01 committed Dec 5, 2019
1 parent c38e6df commit 4b964fb
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ matrix:
- cd ../wrappers/nodejs/
- npm install
- cd test
- wget http://realsense-hw-public.s3.amazonaws.com/rs-tests/nodejs_record_tests.rec
- mocha test-functional.js --playback nodejs_record_tests.rec
- wget http://realsense-hw-public.s3.amazonaws.com/rs-tests/nodejs_records.rec
- mocha test-functional.js --playback nodejs_records.rec

- name: "Mac - cpp"
os: osx
Expand Down
19 changes: 16 additions & 3 deletions wrappers/nodejs/test/test-functional.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ function makeContext(section) {
describe('Pipeline tests', function() {
let ctx;
let pipe;
this.timeout(5000);

before(function() {
ctx = makeContext('pipeline');
pipe = new rs2.Pipeline(ctx);
Expand Down Expand Up @@ -95,6 +97,7 @@ describe('Frameset test', function() {
let pipe;
let frameset;
let ctx;
this.timeout(5000);

before(function() {
ctx = makeContext('frameset');
Expand Down Expand Up @@ -151,6 +154,7 @@ describe('Frame test', function() {
let color;
let depth;
let ctx;
this.timeout(5000);

before(function() {
ctx = makeContext('frame');
Expand Down Expand Up @@ -231,6 +235,7 @@ if (!(isRecord || isPlayback)) {
let depth;
let colorizer;
let ctx;
this.timeout(5000);

before(function() {
ctx = makeContext('colorizer');
Expand Down Expand Up @@ -321,6 +326,7 @@ if (!(isRecord || isPlayback)) {

describe('Context tests', function() {
let ctx;
this.timeout(5000);

before(() => {
ctx = makeContext('context');
Expand Down Expand Up @@ -364,6 +370,7 @@ describe('Context tests', function() {
describe('Sensor tests', function() {
let ctx;
let sensors;
this.timeout(10000);

before(() => {
ctx = makeContext('sensor');
Expand Down Expand Up @@ -531,10 +538,10 @@ describe('Sensor tests', function() {
if (!isPlayback) {
setTimeout(() => {
dev.cxxDev.triggerErrorForTest();
}, 100);
}, 5000);
}
});
}).timeout(5000);
});
});

// describe('Align tests', function() {
Expand Down Expand Up @@ -568,6 +575,7 @@ describe(('syncer test'), function() {
let syncer;
let ctx;
let sensors;
this.timeout(5000);

before(() => {
ctx = makeContext('syncer');
Expand Down Expand Up @@ -604,6 +612,7 @@ describe('Config test', function() {
let pipe;
let cfg;
let ctx;
this.timeout(5000);

before(function() {
ctx = makeContext('config');
Expand Down Expand Up @@ -810,6 +819,8 @@ if (!(isRecord || isPlayback)) {

describe('Device tests', function() {
let dev;
this.timeout(5000);

before(function() {
let ctx = makeContext('device');
dev = ctx.queryDevices().devices[0];
Expand Down Expand Up @@ -857,6 +868,8 @@ describe('filter tests', function() {
let temporalFilter;
let spatialFilter;
let pipeline;
this.timeout(10000);

before(function() {
ctx = makeContext('filter');
decimationFilter = new rs2.DecimationFilter();
Expand All @@ -877,7 +890,7 @@ describe('filter tests', function() {
let out = temporalFilter.process(depthFrame);
assert.equal(out instanceof rs2.DepthFrame, true);
assert.equal(typeof out.width, 'number');
}).timeout(10000); // change the threshold to be 10 seconds to avoid timeout.
})

it('spatial filter', () => {
let frameset = pipeline.waitForFrames();
Expand Down

0 comments on commit 4b964fb

Please sign in to comment.