Skip to content

Commit

Permalink
Fix java debugger integration tests (#11395)
Browse files Browse the repository at this point in the history
Signed-off-by: Anatoliy Bazko <[email protected]>
  • Loading branch information
tolusha authored and tsmaeder committed Oct 12, 2018
1 parent a5d8ac1 commit 018a081
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 35 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public void shouldAddBreakpointByFqn() throws Exception {
Breakpoint actualBreakpoint = ((BreakpointActivatedEvent) debuggerEvent).getBreakpoint();
Location actualLocation = actualBreakpoint.getLocation();
assertEquals(actualLocation.getLineNumber(), 21);
assertEquals(actualLocation.getTarget(), "org.eclipse.BreakpointsTest");
assertEquals(actualLocation.getTarget(), "/test/src/org/eclipse/BreakpointsTest.java");
assertEquals(actualLocation.getResourceProjectPath(), "/test");
assertTrue(actualBreakpoint.isEnabled());

Expand All @@ -110,7 +110,7 @@ public void shouldAddBreakpointByFqn() throws Exception {

Location suspendLocation = ((SuspendEvent) debuggerEvent).getLocation();
assertEquals(suspendLocation.getLineNumber(), 21);
assertEquals(actualLocation.getTarget(), "org.eclipse.BreakpointsTest");
assertEquals(actualLocation.getTarget(), "/test/src/org/eclipse/BreakpointsTest.java");
assertEquals(actualLocation.getResourceProjectPath(), "/test");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,9 @@ private void validateMainThreadDump(List<ThreadStateDto> threads) {

Location location = stackFrameDump.getLocation();
assertEquals(location.getLineNumber(), 27);
assertEquals(location.getTarget(), "org.eclipse.ThreadDumpTest1");
assertEquals(location.getExternalResourceId(), 0);
assertNull(location.getResourceProjectPath());
assertEquals(location.getTarget(), "/test/src/org/eclipse/ThreadDumpTest.java");
assertNull(location.getExternalResourceId());
assertEquals(location.getResourceProjectPath(), "/test");

Method method = location.getMethod();
assertEquals(method.getName(), "main");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<outputDirectory>./org/eclipse</outputDirectory>
</file>
<file>
<source>${project.build.testOutputDirectory}/workspace/test/src/org/eclipse/SuspendPolicyTest.java</source>
<source>${project.build.testOutputDirectory}/testclasses/SuspendPolicyTest.java</source>
<outputDirectory>./org/eclipse</outputDirectory>
</file>
<file>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

javac -g org/eclipse/BreakpointsTest.java
javac -g org/eclipse/BreakpointsByConditionTest.java
javac -g org/eclipse/SuspendPolicyTest.java
javac -g org/eclipse/ThreadDumpTest.java
javac -g org/eclipse/StackFrameDumpTest.java
javac -g org/eclipse/GetValueTest.java
Expand All @@ -24,8 +25,8 @@ DEBUG_OPT="-Xdebug -Xrunjdwp:transport=dt_socket,address=8001,server=y,suspend=y

java ${DEBUG_OPT} org.eclipse.BreakpointsTest
java ${DEBUG_OPT} org.eclipse.BreakpointsByConditionTest

java ${DEBUG_OPT} org.eclipse.ThreadDumpTest
java ${DEBUG_OPT} org.eclipse.SuspendPolicyTest
java ${DEBUG_OPT} org.eclipse.StackFrameDumpTest
java ${DEBUG_OPT} org.eclipse.GetValueTest
java ${DEBUG_OPT} org.eclipse.EvaluateExpressionTest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ public class BreakpointsByConditionTest {

public static void main(String[] args) {
int k = 0;
for (int i = 0; i < 10; i++) {
k++;
}

k = 1;
for (int i = 0; i < 10; i++) {
k = i;
}
Expand Down

This file was deleted.

0 comments on commit 018a081

Please sign in to comment.