Skip to content

Commit

Permalink
test memory allocation issues in rust
Browse files Browse the repository at this point in the history
  • Loading branch information
hughy committed Sep 13, 2024
1 parent 9abbc9a commit ac61e04
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 40 deletions.
76 changes: 39 additions & 37 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
push:
branches:
- master
- test/hughy/ironfish-frost

jobs:
lint:
Expand Down Expand Up @@ -63,7 +64,7 @@ jobs:
run: yarn --non-interactive --frozen-lockfile

- name: Run tests
run: yarn test:coverage --maxWorkers=2 --workerIdleMemoryLimit=2000MB
run: yarn test:coverage createSigningPackage.test.ts --maxWorkers=2 --workerIdleMemoryLimit=2000MB

- name: Check for missing fixtures
run: |
Expand All @@ -76,39 +77,40 @@ jobs:
if: github.repository == 'iron-fish/ironfish'
run: CODECOV_TOKEN=${{ secrets.CODECOV_TOKEN }} ROOT_PATH=$GITHUB_WORKSPACE/ yarn coverage:upload

testslow:
name: Slow Tests
runs-on: ubuntu-latest

steps:
- name: Check out Git repository
uses: actions/checkout@v4

- name: Use Node.js
uses: actions/setup-node@v4
with:
# Tests will only run on Node v20 due to https://github.com/nodejs/node/issues/35889
node-version: 20
cache: 'yarn'

- name: Cache Rust
uses: Swatinem/rust-cache@v2
with:
shared-key: nodejs

- name: Install packages
run: yarn --non-interactive --frozen-lockfile

- name: Run slow tests & coverage
run: yarn test:slow:coverage --maxWorkers=2 --workerIdleMemoryLimit=2000MB

- name: Check for missing fixtures
run: |
if [[ $(git status | grep fixture) ]]; then
echo "New test fixtures have not been checked in, please check them in."
exit 1
fi
- name: Upload coverage
if: github.repository == 'iron-fish/ironfish'
run: CODECOV_TOKEN=${{ secrets.CODECOV_TOKEN }} ROOT_PATH=$GITHUB_WORKSPACE/ yarn coverage:upload
# testslow:
# name: Slow Tests
# runs-on: ubuntu-latest
#
# steps:
# - name: Check out Git repository
# uses: actions/checkout@v4
#
# - name: Use Node.js
# uses: actions/setup-node@v4
# with:
# # Tests will only run on Node v20 due to https://github.com/nodejs/node/issues/35889
# node-version: 20
# cache: 'yarn'
#
# - name: Cache Rust
# uses: Swatinem/rust-cache@v2
# with:
# shared-key: nodejs
#
# - name: Install packages
# run: yarn --non-interactive --frozen-lockfile
#
# - name: Run slow tests & coverage
# run: yarn test:slow:coverage --maxWorkers=2 --workerIdleMemoryLimit=2000MB
#
# - name: Check for missing fixtures
# run: |
# if [[ $(git status | grep fixture) ]]; then
# echo "New test fixtures have not been checked in, please check them in."
# exit 1
# fi
#
# - name: Upload coverage
# if: github.repository == 'iron-fish/ironfish'
# run: CODECOV_TOKEN=${{ secrets.CODECOV_TOKEN }} ROOT_PATH=$GITHUB_WORKSPACE/ yarn coverage:upload
#
6 changes: 3 additions & 3 deletions ironfish/src/wallet/exporter/encryption.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ describe('Wallet Export Encryption', () => {
const secret = multisig.ParticipantSecret.random()
const identity = secret.toIdentity()

it('encodes an account and decodes the string', () => {
it.skip('encodes an account and decodes the string', () => {
const encoded = new JsonEncoder().encode(account)
const encrypted = encryptEncodedAccount(encoded, {
kind: 'MultisigIdentity',
Expand All @@ -43,7 +43,7 @@ describe('Wallet Export Encryption', () => {
expect(decrypted).toEqual(encoded)
})

it('returns null when decoding with the wrong secret', () => {
it.skip('returns null when decoding with the wrong secret', () => {
const wrongSecret = multisig.ParticipantSecret.random()

const encoded = new JsonEncoder().encode(account)
Expand Down Expand Up @@ -81,7 +81,7 @@ describe('Wallet Export Encryption', () => {
expect(encrypted.slice(BASE64_JSON_MULTISIG_ENCRYPTED_ACCOUNT_PREFIX.length)).toBeBase64()
})

it('should decrypt an account using wallet secrets', async () => {
it.skip('should decrypt an account using wallet secrets', async () => {
const identity = await nodeTest.wallet.createMultisigSecret('foo')

const encoded = new JsonEncoder().encode(account)
Expand Down

0 comments on commit ac61e04

Please sign in to comment.