chore: fix flaky test and stop running broken examples in ci
This commit is contained in:
committed by
Michael Vines
parent
5f0b182a3b
commit
d3a2934e75
@ -47,7 +47,6 @@ script:
|
|||||||
- examples/bpf-rust-noop/do.sh build
|
- examples/bpf-rust-noop/do.sh build
|
||||||
- npm run localnet:update
|
- npm run localnet:update
|
||||||
- npm run localnet:up
|
- npm run localnet:up
|
||||||
- npm run examples || true
|
|
||||||
- npm run test:live
|
- npm run test:live
|
||||||
- npm run localnet:down
|
- npm run localnet:down
|
||||||
|
|
||||||
|
@ -1402,15 +1402,14 @@ test('transaction failure', async () => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const responseConfirmations = response.confirmations;
|
|
||||||
if (typeof responseConfirmations !== 'number') {
|
|
||||||
expect(typeof responseConfirmations).toEqual('number');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
expect(response.err).toEqual(expectedErr);
|
expect(response.err).toEqual(expectedErr);
|
||||||
expect(response.slot).toBeGreaterThanOrEqual(0);
|
expect(response.slot).toBeGreaterThanOrEqual(0);
|
||||||
expect(responseConfirmations).toBeGreaterThan(0);
|
const responseConfirmations = response.confirmations;
|
||||||
|
if (typeof responseConfirmations === 'number') {
|
||||||
|
expect(responseConfirmations).toBeGreaterThan(0);
|
||||||
|
} else {
|
||||||
|
expect(responseConfirmations).toBeNull();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
test('transaction', async () => {
|
test('transaction', async () => {
|
||||||
@ -1600,15 +1599,14 @@ test('transaction', async () => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const responseConfirmations = response.confirmations;
|
|
||||||
if (typeof responseConfirmations !== 'number') {
|
|
||||||
expect(typeof responseConfirmations).toEqual('number');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
expect(response.err).toBeNull();
|
expect(response.err).toBeNull();
|
||||||
expect(response.slot).toBeGreaterThanOrEqual(0);
|
expect(response.slot).toBeGreaterThanOrEqual(0);
|
||||||
expect(responseConfirmations).toBeGreaterThan(0);
|
const responseConfirmations = response.confirmations;
|
||||||
|
if (typeof responseConfirmations === 'number') {
|
||||||
|
expect(responseConfirmations).toBeGreaterThan(0);
|
||||||
|
} else {
|
||||||
|
expect(responseConfirmations).toBeNull();
|
||||||
|
}
|
||||||
|
|
||||||
const unprocessedSignature =
|
const unprocessedSignature =
|
||||||
'8WE5w4B7v59x6qjyC4FbG2FEKYKQfvsJwqSxNVmtMjT8TQ31hsZieDHcSgqzxiAoTL56n2w5TncjqEKjLhtF4Vk';
|
'8WE5w4B7v59x6qjyC4FbG2FEKYKQfvsJwqSxNVmtMjT8TQ31hsZieDHcSgqzxiAoTL56n2w5TncjqEKjLhtF4Vk';
|
||||||
@ -1658,15 +1656,18 @@ test('transaction', async () => {
|
|||||||
expect(firstResponse.slot).toBeGreaterThanOrEqual(response.slot);
|
expect(firstResponse.slot).toBeGreaterThanOrEqual(response.slot);
|
||||||
expect(firstResponse.err).toEqual(response.err);
|
expect(firstResponse.err).toEqual(response.err);
|
||||||
|
|
||||||
if (typeof firstResponse.confirmations !== 'number') {
|
const firstResponseConfirmations = firstResponse.confirmations;
|
||||||
expect(typeof firstResponse.confirmations).toEqual('number');
|
if (
|
||||||
return;
|
typeof responseConfirmations === 'number' &&
|
||||||
|
typeof firstResponseConfirmations === 'number'
|
||||||
|
) {
|
||||||
|
expect(firstResponseConfirmations).toBeGreaterThanOrEqual(
|
||||||
|
responseConfirmations,
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
expect(firstResponseConfirmations).toBeNull();
|
||||||
}
|
}
|
||||||
|
|
||||||
expect(firstResponse.confirmations).toBeGreaterThanOrEqual(
|
|
||||||
responseConfirmations,
|
|
||||||
);
|
|
||||||
|
|
||||||
mockRpc.push([
|
mockRpc.push([
|
||||||
url,
|
url,
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user