Skip to content

Commit

Permalink
[tests] adopts patch test for both VMs
Browse files Browse the repository at this point in the history
  • Loading branch information
trespasserw committed May 11, 2016
1 parent 8323b91 commit 4010f80
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion updater/testSrc/com/intellij/updater/PatchTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,9 @@ public void testValidatingNonAccessibleFiles() throws Exception {
Patch patch = createPatch();
File f = new File(myOlderDir, "Readme.txt");
try (FileOutputStream s = new FileOutputStream(f, true); FileLock ignored = s.getChannel().lock()) {
String message = UtilsTest.mIsWindows ? "Locked by: Java(TM) Platform SE binary" : ValidationResult.ACCESS_DENIED_MESSAGE;
String message = UtilsTest.mIsWindows ? System.getProperty("java.vm.name").contains("OpenJDK")
? "Locked by: OpenJDK Platform binary" : "Locked by: Java(TM) Platform SE binary"
: ValidationResult.ACCESS_DENIED_MESSAGE;
ValidationResult.Option option = UtilsTest.mIsWindows ? ValidationResult.Option.KILL_PROCESS : ValidationResult.Option.IGNORE;
assertThat(patch.validate(myOlderDir, TEST_UI)).containsOnly(
new ValidationResult(ValidationResult.Kind.ERROR,
Expand Down

0 comments on commit 4010f80

Please sign in to comment.