Skip to content

Commit

Permalink
fix(testng): use compiler.run (#5984)
Browse files Browse the repository at this point in the history
  • Loading branch information
LingyuCoder committed Mar 20, 2024
1 parent c6b5831 commit 6b6429d
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 7 deletions.
4 changes: 2 additions & 2 deletions packages/rspack-test-tools/tests/compilerCases/compilation.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ module.exports = {
},
async build(_, compiler) {
await new Promise(resolve => {
compiler.build(() => {
compiler.build(() => {
compiler.run(() => {
compiler.run(() => {
resolve();
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ module.exports = {
},
async build(_, compiler) {
await new Promise(resolve => {
compiler.build(() => {
compiler.build(() => {
compiler.run(() => {
compiler.run(() => {
resolve();
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module.exports = {
},
async build(context, compiler) {
await new Promise((resolve, reject) => {
compiler.build(err => {
compiler.run(err => {
if (err) {
return reject(err);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module.exports = {
},
async build(context, compiler) {
await new Promise((resolve, reject) => {
compiler.build(err => {
compiler.run(err => {
if (err) {
return reject(err);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ module.exports = {
<t> finish make hook: X ms
<t> finish compilation: X ms
<t> seal compilation: X ms
<t> afterCompile hook: X ms
<t> emitAssets: X ms
<t> done hook: X ms
Expand Down

2 comments on commit 6b6429d

@rspack-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 Benchmark detail: Open

Name Base (2024-03-20 afdf730) Current Change
10000_development-mode + exec 2.02 s ± 34 ms 1.93 s ± 39 ms -4.18 %
10000_development-mode_hmr + exec 744 ms ± 8.2 ms 739 ms ± 6.7 ms -0.72 %
10000_production-mode + exec 2.82 s ± 23 ms 2.79 s ± 28 ms -0.88 %
arco-pro_development-mode + exec 2.48 s ± 32 ms 2.46 s ± 28 ms -0.66 %
arco-pro_development-mode_hmr + exec 516 ms ± 5 ms 514 ms ± 2.6 ms -0.38 %
arco-pro_development-mode_hmr_intercept-plugin + exec 533 ms ± 7.8 ms 529 ms ± 6 ms -0.77 %
arco-pro_development-mode_intercept-plugin + exec 3.3 s ± 27 ms 3.32 s ± 33 ms +0.41 %
arco-pro_production-mode + exec 4.23 s ± 46 ms 4.19 s ± 67 ms -0.91 %
arco-pro_production-mode_intercept-plugin + exec 5.06 s ± 38 ms 5.07 s ± 40 ms +0.15 %
threejs_development-mode_10x + exec 1.91 s ± 17 ms 1.9 s ± 19 ms -0.61 %
threejs_development-mode_10x_hmr + exec 739 ms ± 6.9 ms 736 ms ± 5.9 ms -0.39 %
threejs_production-mode_10x + exec 5.95 s ± 70 ms 5.67 s ± 39 ms -4.83 %

@rspack-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 Ran ecosystem CI: Open

suite result
modernjs, self-hosted, Linux, ci, ec2-linux ✅ success
_selftest, ubuntu-latest ✅ success
nx, ubuntu-latest ✅ success
rspress, ubuntu-latest ✅ success
rsbuild, ubuntu-latest ✅ success
compat, ubuntu-latest ✅ success
examples, ubuntu-latest ✅ success

Please sign in to comment.