Commit 7d553e85 authored by Linshizhi's avatar Linshizhi

unittest edits

parent 5250a462
......@@ -316,7 +316,7 @@ describe("Channel Spec", () => {
}, 10000);
fit("BLK-BASED Channel Case 1", async () => {
it("BLK-BASED Channel Case 1", async () => {
const blkSize = 10;
let chn = new Channel(blkSize * 2);
chn.enableBlockMode(blkSize);
......@@ -329,4 +329,7 @@ describe("Channel Spec", () => {
expect(chn.dataSize()).toBe(blkSize * 2);
});
it("BLK-BASED Channel Case 2", async () => {
});
});
......@@ -9,7 +9,7 @@ describe("H264EncWWGroup Spec", () => {
await sleep(1000);
expect(wg.numOfWorker()).toBe(2);
});
}, 10000);
it("Encode by H264EncWWGroup Spec", async () => {
const RGBAFrameSize = 1920*1080*4;
......@@ -23,7 +23,7 @@ describe("H264EncWWGroup Spec", () => {
const data = new Uint8Array([...Array(RGBAFrameSize).keys()]);
for (let i = 0; i < 300; ++i) {
for (let i = 0; i < 30; ++i) {
await grp.dispatch(data);
}
......@@ -34,7 +34,6 @@ describe("H264EncWWGroup Spec", () => {
await waitCond(() => grp.isDone());
let result = await grp.getResult();
console.log(result);
grp.terminate();
......
......@@ -145,9 +145,7 @@ describe("EncWW Specifications", () => {
// Send datas
for (let i = 0; i < 30; ++i) {
while (chs[i%2].push(data) == false) {
console.log("sleep");
}
while (chs[i%2].push(data) == false) {}
}
// Send eof
......@@ -305,8 +303,6 @@ describe("EncWW Specifications", () => {
}, 100);
});
console.log("Ready");
const data = new Uint8Array([...Array(RGBAFrameSize).keys()]);
let input_1 = new Channel(INPUT_SIZE, SharedArrayBuffer, mem1);
......@@ -324,12 +320,10 @@ describe("EncWW Specifications", () => {
))
let inputs = [ input_1, input_2 ];
for (let i = 0; i < 300; ++i) {
for (let i = 0; i < 30; ++i) {
while (inputs[i%2].push(data) == false) {
console.log("Sleep");
await sleep(100);
}
console.log("PUSH IN MAIN\n");
}
input_1.setPriv(PRIV_FLAGS.EOF);
......@@ -344,8 +338,6 @@ describe("EncWW Specifications", () => {
}, 1000);
});
console.log("ALL DONE");
let done = false;
mux.subscribe(msg => {
done = true;
......
......@@ -18,7 +18,7 @@ const RGBAFrameSize = 1920*1080*4;
describe("ParaEncoder", () => {
it("Encode With ParaEncoder", async () => {
xit("Encode With ParaEncoder", async () => {
const data = new Uint8Array([...Array(RGBAFrameSize).keys()]);
let st = new Date();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment