refs #6213 fixIntermitentError
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Pablo Natek 2023-10-03 08:57:59 +02:00
parent ca556349a8
commit 96769d9ff9
4 changed files with 12 additions and 2 deletions

View File

@ -52,6 +52,15 @@ async function test() {
await backendStatus();
jasmine.jasmine.DEFAULT_TIMEOUT_INTERVAL = 30000;
const myReporter = {
specDone: function(result) {
for (const expectation of result.failedExpectations) {
console.warn('SpecFailed: ' + result.description);
console.warn('Failure: ' + expectation.message);
}
}
};
jasmine.addReporter(myReporter);
await jasmine.execute();
}

View File

@ -32,6 +32,7 @@ describe('Supplier newSupplier()', () => {
const result = await models.Supplier.newSupplier(ctx, options);
expect(result.name).toEqual('newSupplier');
await tx.rollback();
} catch (e) {
await tx.rollback();
throw e;

View File

@ -129,10 +129,10 @@ describe('loopback model Supplier', () => {
const options = {transaction: tx};
try {
const newSupplier = await models.Supplier.create({id: '9999', name: 'Alfred Pennyworth'}, options);
const newSupplier = await models.Supplier.create({name: 'Alfred Pennyworth'}, options);
const fetchedSupplier = await models.Supplier.findById(newSupplier.id, null, options);
expect(fetchedSupplier.account).toEqual('4100009999');
expect(Number(fetchedSupplier.account)).toEqual(4100000000 + newSupplier.id);
await tx.rollback();
} catch (e) {
await tx.rollback();