try to fix test timeout (again)
Some checks failed
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/lint-client Pipeline failed
ci/woodpecker/push/lint-backend Pipeline failed
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-sw Pipeline failed
ci/woodpecker/push/test Pipeline failed

This commit is contained in:
Johann150 2023-05-31 12:42:13 +02:00
parent 94cd10365d
commit af003fc0fe
Signed by: Johann150
GPG key ID: 9EE6577A2A06F8F1
11 changed files with 38 additions and 35 deletions

View file

@ -4,11 +4,12 @@ import * as assert from 'assert';
import * as childProcess from 'child_process';
import { async, signup, request, post, startServer, shutdownServer } from './utils.js';
describe('API visibility', () => {
describe('API visibility', function() {
this.timeout(20*60*1000);
let p: childProcess.ChildProcess;
before(async () => {
this.timeout(0);
p = await startServer();
});

View file

@ -4,14 +4,15 @@ import * as assert from 'assert';
import * as childProcess from 'child_process';
import { async, signup, request, post, react, uploadFile, startServer, shutdownServer } from './utils.js';
describe('API', () => {
describe('API', function() {
this.timeout(20*60*1000);
let p: childProcess.ChildProcess;
let alice: any;
let bob: any;
let carol: any;
before(async () => {
this.timeout(0);
p = await startServer();
alice = await signup({ username: 'alice' });
bob = await signup({ username: 'bob' });

View file

@ -4,7 +4,9 @@ import * as assert from 'assert';
import * as childProcess from 'child_process';
import { async, signup, request, post, startServer, shutdownServer } from './utils.js';
describe('Block', () => {
describe('Block', function() {
this.timeout(20*60*1000);
let p: childProcess.ChildProcess;
// alice blocks bob
@ -13,8 +15,6 @@ describe('Block', () => {
let carol: any;
before(async () => {
this.timeout(0);
p = await startServer();
alice = await signup({ username: 'alice' });
bob = await signup({ username: 'bob' });

View file

@ -16,14 +16,15 @@ const AP = 'application/activity+json; charset=utf-8';
const JSON = 'application/json; charset=utf-8';
const HTML = 'text/html; charset=utf-8';
describe('Fetch resource', () => {
describe('Fetch resource', function() {
this.timeout(20*60*1000);
let p: childProcess.ChildProcess;
let alice: any;
let alicesPost: any;
before(async () => {
this.timeout(0);
p = await startServer();
alice = await signup({ username: 'alice' });
alicesPost = await post(alice, {

View file

@ -4,7 +4,9 @@ import * as assert from 'assert';
import * as childProcess from 'child_process';
import { async, signup, request, post, react, connectStream, startServer, shutdownServer, simpleGet } from './utils.js';
describe('FF visibility', () => {
describe('FF visibility', function() {
this.timeout(20*60*1000);
let p: childProcess.ChildProcess;
let alice: any;
@ -12,8 +14,6 @@ describe('FF visibility', () => {
let follower: any;
before(async () => {
this.timeout(0);
p = await startServer();
alice = await signup({ username: 'alice' });
bob = await signup({ username: 'bob' });

View file

@ -4,7 +4,9 @@ import * as assert from 'assert';
import * as childProcess from 'child_process';
import { async, signup, request, post, react, startServer, shutdownServer, waitFire } from './utils.js';
describe('Mute', () => {
describe('Mute', function() {
this.timeout(20*60*1000);
let p: childProcess.ChildProcess;
// alice mutes carol
@ -13,8 +15,6 @@ describe('Mute', () => {
let carol: any;
before(async () => {
this.timeout(0);
p = await startServer();
alice = await signup({ username: 'alice' });
bob = await signup({ username: 'bob' });

View file

@ -5,7 +5,9 @@ import * as childProcess from 'child_process';
import { Note } from '../src/models/entities/note.js';
import { async, signup, request, post, uploadUrl, startServer, shutdownServer, initTestDb, api } from './utils.js';
describe('Note', () => {
describe('Note', function() {
this.timeout(20*60*1000);
let p: childProcess.ChildProcess;
let Notes: any;
@ -13,8 +15,6 @@ describe('Note', () => {
let bob: any;
before(async () => {
this.timeout(0);
p = await startServer();
const connection = await initTestDb(true);
Notes = connection.getRepository(Note);

View file

@ -5,7 +5,9 @@ import * as childProcess from 'child_process';
import * as sinon from 'sinon';
import { async, signup, startServer, shutdownServer, initTestDb } from '../utils.js';
describe('Creating a block activity', () => {
describe('Creating a block activity', function() {
this.timeout(20*60*1000);
let p: childProcess.ChildProcess;
// alice blocks bob
@ -14,8 +16,6 @@ describe('Creating a block activity', () => {
let carol: any;
before(async () => {
this.timeout(0);
await initTestDb();
p = await startServer();
alice = await signup({ username: 'alice' });

View file

@ -24,7 +24,9 @@ describe('Streaming', () => {
});
};
describe('Streaming', () => {
describe('Streaming', function() {
this.timeout(20*60*1000);
// Local users
let ayano: any;
let kyoko: any;
@ -38,8 +40,6 @@ describe('Streaming', () => {
let list: any;
before(async () => {
this.timeout(0);
p = await startServer();
const connection = await initTestDb(true);
Followings = connection.getRepository(Following);
@ -410,7 +410,7 @@ describe('Streaming', () => {
let fooCount = 0;
let barCount = 0;
let fooBarCount = 0;
const ws = await connectStream(chitose, 'hashtag', ({ type, body }) => {
if (type == 'note') {
if (body.text === '#foo') fooCount++;
@ -422,19 +422,19 @@ describe('Streaming', () => {
['foo', 'bar'],
],
});
post(chitose, {
text: '#foo',
});
post(chitose, {
text: '#bar',
});
post(chitose, {
text: '#foo #bar',
});
setTimeout(() => {
assert.strictEqual(fooCount, 0);
assert.strictEqual(barCount, 0);

View file

@ -4,7 +4,9 @@ import * as assert from 'assert';
import * as childProcess from 'child_process';
import { async, signup, request, post, react, connectStream, startServer, shutdownServer } from './utils.js';
describe('Note thread mute', () => {
describe('Note thread mute', function() {
this.timeout(20*60*1000);
let p: childProcess.ChildProcess;
let alice: any;
@ -12,8 +14,6 @@ describe('Note thread mute', () => {
let carol: any;
before(async () => {
this.timeout(0);
p = await startServer();
alice = await signup({ username: 'alice' });
bob = await signup({ username: 'bob' });

View file

@ -4,7 +4,9 @@ import * as assert from 'assert';
import * as childProcess from 'child_process';
import { async, signup, request, post, uploadUrl, startServer, shutdownServer } from './utils.js';
describe('users/notes', () => {
describe('users/notes', function() {
this.timeout(20*60*1000);
let p: childProcess.ChildProcess;
let alice: any;
@ -13,8 +15,6 @@ describe('users/notes', () => {
let jpgPngNote: any;
before(async () => {
this.timeout(0);
p = await startServer();
alice = await signup({ username: 'alice' });
const jpg = await uploadUrl(alice, 'https://raw.githubusercontent.com/misskey-dev/misskey/develop/packages/backend/test/resources/Lenna.jpg');