Skip to content

Commit

Permalink
[GR-49885] Unignoring DAP tests.
Browse files Browse the repository at this point in the history
PullRequest: graal/15991
  • Loading branch information
entlicher committed Nov 8, 2023
2 parents 0bcc583 + 5cf426f commit 2d73b26
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,23 @@ Context getContext() {
}

public void finish() throws IOException {
finish(true);
}

public void finish(boolean success) throws IOException {
if (!lastValue.isDone()) {
try {
lastValue.get();
if (!success) {
throw new AssertionError("Finished successfully, but expected to fail.");
}
} catch (InterruptedException ex) {
throw new AssertionError("Last eval(...) has not finished yet", ex);
} catch (ExecutionException ex) {
// Guest language execution failed
throw new AssertionError(ex);
if (success) {
throw new AssertionError(ex);
}
}
}
if (handler.getInputStream().available() > 0) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
import org.graalvm.polyglot.Source;
import org.junit.After;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;

import com.oracle.truffle.api.instrumentation.test.InstrumentationTestLanguage;
Expand All @@ -48,7 +47,6 @@ public void tearDown() {
}

@Test
@Ignore("GR-43473")
public void testOutput() throws Exception {
Source source = Source.newBuilder(InstrumentationTestLanguage.ID, "ROOT(\n" +
" PRINT(OUT, CONSTANT(\"one\ntwo\n\")),\n" +
Expand Down Expand Up @@ -138,7 +136,6 @@ public void testOutput() throws Exception {
}

@Test
@Ignore("GR-43473")
public void testOutputEarly() throws Exception {
Source source1 = Source.newBuilder(InstrumentationTestLanguage.ID, "ROOT(\n" +
" PRINT(OUT, CONSTANT(\"Prologue to stdout\n\")),\n" +
Expand Down Expand Up @@ -187,7 +184,6 @@ public void testOutputEarly() throws Exception {

@SuppressWarnings("deprecation")
@Test
@Ignore("GR-43473")
public void testMultiThreading() throws Exception {
Source source = Source.newBuilder(InstrumentationTestLanguage.ID, new URL("file:///path/TestThreads.itl")).content("ROOT(\n" +
"DEFINE(f,\n" +
Expand Down Expand Up @@ -298,7 +294,6 @@ public void testMultiThreading() throws Exception {

@SuppressWarnings("deprecation")
@Test
@Ignore("GR-43473")
public void testBadSourceReference() throws Exception {
Source source = Source.newBuilder(InstrumentationTestLanguage.ID, new URL("file:///path/TestSrcRef.itl")).content("ROOT(\n" +
" STATEMENT(),\n" +
Expand Down Expand Up @@ -348,7 +343,6 @@ public void testBadSourceReference() throws Exception {
}

@Test
@Ignore("GR-43473")
public void testEagerSourceLoad() throws Exception {
Source source1 = Source.newBuilder(InstrumentationTestLanguage.ID, "ROOT(\n" +
" EXPRESSION(),\n" +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,10 @@
import org.graalvm.polyglot.Source;

import org.junit.After;
import org.junit.Ignore;
import org.junit.Test;

import static com.oracle.truffle.tools.dap.test.DAPTester.getFilePath;

@Ignore("GR-43473")
public final class SimpleLanguageDAPTest {

private static final String FACTORIAL = "function factorial(n) {\n" +
Expand Down Expand Up @@ -1022,7 +1020,7 @@ public void testExceptionBreakpoints() throws Exception {
"{\"event\":\"continued\",\"body\":{\"threadId\":1,\"allThreadsContinued\":false},\"type\":\"event\"}",
"{\"success\":true,\"body\":{\"allThreadsContinued\":false},\"type\":\"response\",\"request_seq\":9,\"command\":\"continue\"}"
);
tester.finish();
tester.finish(false);
}

@Test
Expand Down

0 comments on commit 2d73b26

Please sign in to comment.