Skip to content

Commit

Permalink
Remove usage of deprecated dart:io constants. (dart-lang/test_process#11
Browse files Browse the repository at this point in the history
)
  • Loading branch information
lrhn authored Jun 1, 2018
1 parent 0a054b0 commit 22f3850
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions pkgs/test_process/lib/test_process.dart
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ class TestProcess {
// If the process is already dead, do nothing.
if (await _exitCodeOrNull != null) return;

_process.kill(ProcessSignal.SIGKILL);
_process.kill(ProcessSignal.sigkill);

// Log output now rather than waiting for the exitCode callback so that
// it's visible even if we time out waiting for the process to die.
Expand Down Expand Up @@ -217,7 +217,7 @@ class TestProcess {
///
/// If this is called after the process is already dead, it does nothing.
Future kill() async {
_process.kill(ProcessSignal.SIGKILL);
_process.kill(ProcessSignal.sigkill);
await exitCode;
}

Expand Down
2 changes: 1 addition & 1 deletion pkgs/test_process/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ author: Dart Team <misc@dartlang.org>
homepage: https://github.com/dart-lang/test_process

environment:
sdk: '>=2.0.0-dev.17.0 <2.0.0'
sdk: '>=2.0.0-dev.55.0 <2.0.0'

dependencies:
async: ">=1.12.0 <3.0.0"
Expand Down
4 changes: 2 additions & 2 deletions pkgs/test_process/test/test_process_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,12 @@ void main() {

test("signal sends a signal to the process", () async {
var process = await startDartProcess(r'''
ProcessSignal.SIGHUP.watch().listen((_) => print("HUP"));
ProcessSignal.sighup.watch().listen((_) => print("HUP"));
print("ready");
''');

await expectLater(process.stdout, emits('ready'));
process.signal(ProcessSignal.SIGHUP);
process.signal(ProcessSignal.sighup);
await expectLater(process.stdout, emits('HUP'));
process.kill();
}, testOn: "!windows");
Expand Down

0 comments on commit 22f3850

Please sign in to comment.