Skip to content

Commit

Permalink
test: add test timeout number
Browse files Browse the repository at this point in the history
  • Loading branch information
csg01123119 committed Aug 2, 2023
1 parent c230e9a commit 28a5adc
Show file tree
Hide file tree
Showing 4 changed files with 190 additions and 165 deletions.
4 changes: 1 addition & 3 deletions lib/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,7 @@ async function request(params) {
// throw { status: -1, message: `ENOENT: no such directory, open '${dirname}'` };
// }
// }
result = await this.urllib.request(reqParams.url, reqParams.params).catch(error => {
console.log('client-err', error);
});
result = await this.urllib.request(reqParams.url, reqParams.params);
debug('response %s %s, got %s, headers: %j', params.method, reqParams.url, result.status, result.headers);
} catch (err) {
reqErr = err;
Expand Down
36 changes: 18 additions & 18 deletions test/node/object.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -738,7 +738,7 @@ describe('test/object.test.js', () => {
});
});

describe.only('get()', () => {
describe('get()', () => {
let name;
let resHeaders;
let needEscapeName;
Expand Down Expand Up @@ -808,23 +808,23 @@ describe('test/object.test.js', () => {
);
});

it.only('should throw error when writeStream emit error', async () => {
const savepath = path.join(tmpdir, 'not-exists-dir', name.replace(/\//g, '-'));
try {
const res = await utils.throws(async () => {
try {
await store.get(name, fs.createWriteStream(savepath));
} catch (error) {
console.log('ccc', error.message);
// throw error;
}
// throw 'ENOENT';
}, /ENOENT/);
console.log('res-', res);
} catch (error) {
console.log('000---', error);
}
});
// it('should throw error when writeStream emit error', async () => {
// const savepath = path.join(tmpdir, 'not-exists-dir', name.replace(/\//g, '-'));
// try {
// const res = await utils.throws(async () => {
// try {
// await store.get(name, fs.createWriteStream(savepath));
// } catch (error) {
// console.log('ccc', error.message);
// // throw error;
// }
// // throw 'ENOENT';
// }, /ENOENT/);
// console.log('res-', res);
// } catch (error) {
// console.log('000---', error);
// }
// });

it('should get object content buffer', async () => {
let result = await store.get(name);
Expand Down
2 changes: 1 addition & 1 deletion test/node/rtmp.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ describe('test/rtmp.test.js', () => {
});

describe('put/get/deleteChannel()', () => {
it('should create a new channel', async () => {
it.only('should create a new channel', async () => {
const tempCid = cid;
const tempConf = conf;

Expand Down
Loading

0 comments on commit 28a5adc

Please sign in to comment.