Skip to content

Commit eec75ea

Browse files
authored
Fix: Clean-up cwd after integration tests and increase ramfs size (#4108)
**Summary** We normally clean up the test `cwd` after running them but we don't for integration tests. With the addition of a new test case, this started causing macOS builds to fail on TravisCI due to exhaustion of space on ramdisk which we use to run tests on for speed. This patch also increases ramfs size on Travis to make tests pass since clean up alone was not enough. **Test plan** macOS tests should pass on TravisCI.
1 parent 55d7b00 commit eec75ea

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ matrix:
4545

4646
before_install:
4747
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
48-
RAMDISK_SIZE=300;
48+
RAMDISK_SIZE=320;
4949
RAMDISK_SECTORS=$(( $RAMDISK_SIZE * 1024 * 1024 / 512 ));
5050
RAMDISK=$(hdiutil attach -nomount ram://$RAMDISK_SECTORS);
5151
newfs_hfs -v yarn_ramfs $RAMDISK;

__tests__/integration.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import execa from 'execa';
55
import makeTemp from './_temp.js';
66
import * as fs from '../src/util/fs.js';
77

8-
jasmine.DEFAULT_TIMEOUT_INTERVAL = 60000;
8+
jasmine.DEFAULT_TIMEOUT_INTERVAL = 90000;
99

1010
const path = require('path');
1111

@@ -23,6 +23,8 @@ function addTest(pattern) {
2323
await fs.writeFile(path.join(cwd, 'package.json'), JSON.stringify({name: 'test'}));
2424

2525
await execa(command, ['add', pattern].concat(args), options);
26+
27+
await fs.unlink(cwd);
2628
});
2729
}
2830

0 commit comments

Comments
 (0)