Skip to content

Commit

Permalink
test(Server): tune test data size
Browse files Browse the repository at this point in the history
  • Loading branch information
hans00 committed Jul 22, 2022
1 parent 25817b1 commit 88da5ce
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion test/cases/http-pipe-body-stream-later-1.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const axios = require('axios')

module.exports = async function ({ HTTP_PORT }) {
const body = '__TEST__STRING__'.repeat(4096)
const body = '__TEST__STRING__'.repeat(512)

const res = await axios.post(`http://localhost:${HTTP_PORT}/stream/body-later-1`, body)
if (res.status !== 200) {
Expand Down
2 changes: 1 addition & 1 deletion test/cases/http-pipe-body-stream-later-2.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const axios = require('axios')

module.exports = async function ({ HTTP_PORT }) {
const body = '__TEST__STRING__'.repeat(4096)
const body = '__TEST__STRING__'.repeat(512)

const res = await axios.post(`http://localhost:${HTTP_PORT}/stream/body-later-2`, body)
if (res.status !== 200) {
Expand Down
2 changes: 1 addition & 1 deletion test/cases/http-pipe-body-stream.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const axios = require('axios')

module.exports = async function ({ HTTP_PORT }) {
const body = '__TEST__STRING__'.repeat(4096)
const body = '__TEST__STRING__'.repeat(512)

const res = await axios.post(`http://localhost:${HTTP_PORT}/stream/body`, body)
if (res.status !== 200) {
Expand Down
2 changes: 1 addition & 1 deletion test/cases/http-post-multipart.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const axios = require('axios')
const FormData = require('form-data')

module.exports = async function ({ HTTP_PORT }) {
const fileSize = 10240
const fileSize = 512
const form = new FormData()
form.append('file', Buffer.alloc(fileSize).fill(0))
const res = await axios({
Expand Down
2 changes: 1 addition & 1 deletion test/prepare/http.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module.exports = function (port) {
return new Promise((resolve, reject) => {
try {
app(new fastWS({
bodySize: '1mb',
bodySize: '10kb',
logLevel: 'verbose',
cache: new LRUCache({
ttl: 1000 * 60 * 5,
Expand Down
2 changes: 1 addition & 1 deletion test/prepare/https.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ module.exports = function (port) {
fs.writeFileSync(cert_file_name, cert.cert)
try {
app(new fastWS({
bodySize: '1mb',
bodySize: '10kb',
logLevel: 'verbose',
ssl: {
key_file_name,
Expand Down

0 comments on commit 88da5ce

Please sign in to comment.