JUnit-pligin tests fail when run from maven

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

JUnit-pligin tests fail when run from maven

Jan Baeyens
Hi

In my Sloeber plugin I have changed the project creation code to
restrict to API usage and Since I have done so the maven build fails due
to tests failing.

When I run the test from the eclipse UI they run fine. But run from
maven I see following errors in the log.

What I guess that happens is that the build/indexer fails and wants to
report the error and that somewhere fails.

I attached the log.

Is this a known issue?

What is the best way to see the console output in this case?

Best regards

Jantje

FYI The test script try to build each project 3 times


_______________________________________________
cdt-dev mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/cdt-dev

.log (189K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: JUnit-pligin tests fail when run from maven

Jonah Graham
I don't fully understand the context of the failures, but the error log has this fairly critical error with no explanation of why it may be happening:

Root exception:
java.lang.IllegalStateException: Workbench has not been created yet.
at org.eclipse.ui.PlatformUI.getWorkbench(PlatformUI.java:95)
at org.eclipse.cdt.internal.ui.viewsupport.CDTContextActivator.install(CDTContextActivator.java:65)
at org.eclipse.cdt.ui.CUIPlugin.start(CUIPlugin.java:596)

Perhaps something in about the change you have made changes how Eclipse is being bootstrapped causing the UI not to load. 

Do you have a branch I can see the change on?

Thanks,
Jonah

~~~
Jonah Graham
Kichwa Coders
www.kichwacoders.com


On Thu, 27 Aug 2020 at 14:08, Jan Baeyens <[hidden email]> wrote:
Hi

In my Sloeber plugin I have changed the project creation code to
restrict to API usage and Since I have done so the maven build fails due
to tests failing.

When I run the test from the eclipse UI they run fine. But run from
maven I see following errors in the log.

What I guess that happens is that the build/indexer fails and wants to
report the error and that somewhere fails.

I attached the log.

Is this a known issue?

What is the best way to see the console output in this case?

Best regards

Jantje

FYI The test script try to build each project 3 times

_______________________________________________
cdt-dev mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/cdt-dev

_______________________________________________
cdt-dev mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/cdt-dev
Reply | Threaded
Open this post in threaded view
|

Re: JUnit-pligin tests fail when run from maven

Jan Baeyens

We are talking about the standard sloeber headless build/test and I don't really know what that means for the workbench as it may be a ui component.

https://travis-ci.org/github/Sloeber/arduino-eclipse-plugin

These tests did however run fine before. I have been fiddling around to try to understand what is going on and out of the original 11 failures I'm down to 4 (by reimporting the removed import statements).

Basically the tests create projects and build them. Then tests whether the build was successful. The successful is based on indexer info and existence of the output file.

My current thinking is as follows:
1) The indexer still kicks in to early during the project creation. (100% sure)

!ENTRY org.eclipse.cdt.core 1 0 2020-08-27 02:01:09.291
!MESSAGE Indexed '00001_Library_RTCZero_Epoch' (0 sources, 0 headers) in 0,026 sec: 0 declarations; 0 references; 0 unresolved inclusions; 0 syntax errors; 0 unresolved names (0%)

2) Based on this "bad index" Sloeber tries to add libraries (but doesn't. I know because when I run make in the workspace it fails because of missing libraries)

3) The build starts and fails (due to the missing libraries) and this somehow causes the exception.

Note that the tests I got to work do not rely on the indexer to get libraries attached.

Here is the github pull request that caused the issue.

Thanks

Jantje

Op 27/08/2020 om 20:20 schreef Jonah Graham:
I don't fully understand the context of the failures, but the error log has this fairly critical error with no explanation of why it may be happening:

Root exception:
java.lang.IllegalStateException: Workbench has not been created yet.
at org.eclipse.ui.PlatformUI.getWorkbench(PlatformUI.java:95)
at org.eclipse.cdt.internal.ui.viewsupport.CDTContextActivator.install(CDTContextActivator.java:65)
at org.eclipse.cdt.ui.CUIPlugin.start(CUIPlugin.java:596)

Perhaps something in about the change you have made changes how Eclipse is being bootstrapped causing the UI not to load. 

Do you have a branch I can see the change on?

Thanks,
Jonah

~~~
Jonah Graham
Kichwa Coders
www.kichwacoders.com


On Thu, 27 Aug 2020 at 14:08, Jan Baeyens <[hidden email]> wrote:
Hi

In my Sloeber plugin I have changed the project creation code to
restrict to API usage and Since I have done so the maven build fails due
to tests failing.

When I run the test from the eclipse UI they run fine. But run from
maven I see following errors in the log.

What I guess that happens is that the build/indexer fails and wants to
report the error and that somewhere fails.

I attached the log.

Is this a known issue?

What is the best way to see the console output in this case?

Best regards

Jantje

FYI The test script try to build each project 3 times

_______________________________________________
cdt-dev mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/cdt-dev

_______________________________________________
cdt-dev mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/cdt-dev

_______________________________________________
cdt-dev mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/cdt-dev
Reply | Threaded
Open this post in threaded view
|

Re: JUnit-pligin tests fail when run from maven

Jonah Graham
The PR link is missing? 

Thanks, 
Jonah 

On Thu., Aug. 27, 2020, 16:19 Jan Baeyens, <[hidden email]> wrote:

We are talking about the standard sloeber headless build/test and I don't really know what that means for the workbench as it may be a ui component.

https://travis-ci.org/github/Sloeber/arduino-eclipse-plugin

These tests did however run fine before. I have been fiddling around to try to understand what is going on and out of the original 11 failures I'm down to 4 (by reimporting the removed import statements).

Basically the tests create projects and build them. Then tests whether the build was successful. The successful is based on indexer info and existence of the output file.

My current thinking is as follows:
1) The indexer still kicks in to early during the project creation. (100% sure)

!ENTRY org.eclipse.cdt.core 1 0 2020-08-27 02:01:09.291
!MESSAGE Indexed '00001_Library_RTCZero_Epoch' (0 sources, 0 headers) in 0,026 sec: 0 declarations; 0 references; 0 unresolved inclusions; 0 syntax errors; 0 unresolved names (0%)

2) Based on this "bad index" Sloeber tries to add libraries (but doesn't. I know because when I run make in the workspace it fails because of missing libraries)

3) The build starts and fails (due to the missing libraries) and this somehow causes the exception.

Note that the tests I got to work do not rely on the indexer to get libraries attached.

Here is the github pull request that caused the issue.

Thanks

Jantje

Op 27/08/2020 om 20:20 schreef Jonah Graham:
I don't fully understand the context of the failures, but the error log has this fairly critical error with no explanation of why it may be happening:

Root exception:
java.lang.IllegalStateException: Workbench has not been created yet.
at org.eclipse.ui.PlatformUI.getWorkbench(PlatformUI.java:95)
at org.eclipse.cdt.internal.ui.viewsupport.CDTContextActivator.install(CDTContextActivator.java:65)
at org.eclipse.cdt.ui.CUIPlugin.start(CUIPlugin.java:596)

Perhaps something in about the change you have made changes how Eclipse is being bootstrapped causing the UI not to load. 

Do you have a branch I can see the change on?

Thanks,
Jonah

~~~
Jonah Graham
Kichwa Coders
www.kichwacoders.com


On Thu, 27 Aug 2020 at 14:08, Jan Baeyens <[hidden email]> wrote:
Hi

In my Sloeber plugin I have changed the project creation code to
restrict to API usage and Since I have done so the maven build fails due
to tests failing.

When I run the test from the eclipse UI they run fine. But run from
maven I see following errors in the log.

What I guess that happens is that the build/indexer fails and wants to
report the error and that somewhere fails.

I attached the log.

Is this a known issue?

What is the best way to see the console output in this case?

Best regards

Jantje

FYI The test script try to build each project 3 times

_______________________________________________
cdt-dev mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/cdt-dev

_______________________________________________
cdt-dev mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/cdt-dev
_______________________________________________
cdt-dev mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/cdt-dev

_______________________________________________
cdt-dev mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/cdt-dev
Reply | Threaded
Open this post in threaded view
|

Re: JUnit-pligin tests fail when run from maven

Jan Baeyens

Yes it is.

Sorry

https://github.com/Sloeber/arduino-eclipse-plugin/pull/1201

Op 27/08/2020 om 22:38 schreef Jonah Graham:
The PR link is missing? 

Thanks, 
Jonah 

On Thu., Aug. 27, 2020, 16:19 Jan Baeyens, <[hidden email]> wrote:

We are talking about the standard sloeber headless build/test and I don't really know what that means for the workbench as it may be a ui component.

https://travis-ci.org/github/Sloeber/arduino-eclipse-plugin

These tests did however run fine before. I have been fiddling around to try to understand what is going on and out of the original 11 failures I'm down to 4 (by reimporting the removed import statements).

Basically the tests create projects and build them. Then tests whether the build was successful. The successful is based on indexer info and existence of the output file.

My current thinking is as follows:
1) The indexer still kicks in to early during the project creation. (100% sure)

!ENTRY org.eclipse.cdt.core 1 0 2020-08-27 02:01:09.291
!MESSAGE Indexed '00001_Library_RTCZero_Epoch' (0 sources, 0 headers) in 0,026 sec: 0 declarations; 0 references; 0 unresolved inclusions; 0 syntax errors; 0 unresolved names (0%)

2) Based on this "bad index" Sloeber tries to add libraries (but doesn't. I know because when I run make in the workspace it fails because of missing libraries)

3) The build starts and fails (due to the missing libraries) and this somehow causes the exception.

Note that the tests I got to work do not rely on the indexer to get libraries attached.

Here is the github pull request that caused the issue.

Thanks

Jantje

Op 27/08/2020 om 20:20 schreef Jonah Graham:
I don't fully understand the context of the failures, but the error log has this fairly critical error with no explanation of why it may be happening:

Root exception:
java.lang.IllegalStateException: Workbench has not been created yet.
at org.eclipse.ui.PlatformUI.getWorkbench(PlatformUI.java:95)
at org.eclipse.cdt.internal.ui.viewsupport.CDTContextActivator.install(CDTContextActivator.java:65)
at org.eclipse.cdt.ui.CUIPlugin.start(CUIPlugin.java:596)

Perhaps something in about the change you have made changes how Eclipse is being bootstrapped causing the UI not to load. 

Do you have a branch I can see the change on?

Thanks,
Jonah

~~~
Jonah Graham
Kichwa Coders
www.kichwacoders.com


On Thu, 27 Aug 2020 at 14:08, Jan Baeyens <[hidden email]> wrote:
Hi

In my Sloeber plugin I have changed the project creation code to
restrict to API usage and Since I have done so the maven build fails due
to tests failing.

When I run the test from the eclipse UI they run fine. But run from
maven I see following errors in the log.

What I guess that happens is that the build/indexer fails and wants to
report the error and that somewhere fails.

I attached the log.

Is this a known issue?

What is the best way to see the console output in this case?

Best regards

Jantje

FYI The test script try to build each project 3 times

_______________________________________________
cdt-dev mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/cdt-dev

_______________________________________________
cdt-dev mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/cdt-dev
_______________________________________________
cdt-dev mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/cdt-dev

_______________________________________________
cdt-dev mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/cdt-dev

_______________________________________________
cdt-dev mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/cdt-dev
Reply | Threaded
Open this post in threaded view
|

Re: JUnit-pligin tests fail when run from maven

Jan Baeyens
In reply to this post by Jonah Graham

Looking at the code I see the diff is terrible (I think formatting related because I used the eclipse standard CDT development environment when doing this)

I added 2 comments to point to the important stuff. It is in boardDescriptor.java


https://github.com/Sloeber/arduino-eclipse-plugin/pull/1201/files#diff-e47e567991f4be0540d3f7df00ce2a43R521-R607

Op 27/08/2020 om 22:38 schreef Jonah Graham:
The PR link is missing? 

Thanks, 
Jonah 

On Thu., Aug. 27, 2020, 16:19 Jan Baeyens, <[hidden email]> wrote:

We are talking about the standard sloeber headless build/test and I don't really know what that means for the workbench as it may be a ui component.

https://travis-ci.org/github/Sloeber/arduino-eclipse-plugin

These tests did however run fine before. I have been fiddling around to try to understand what is going on and out of the original 11 failures I'm down to 4 (by reimporting the removed import statements).

Basically the tests create projects and build them. Then tests whether the build was successful. The successful is based on indexer info and existence of the output file.

My current thinking is as follows:
1) The indexer still kicks in to early during the project creation. (100% sure)

!ENTRY org.eclipse.cdt.core 1 0 2020-08-27 02:01:09.291
!MESSAGE Indexed '00001_Library_RTCZero_Epoch' (0 sources, 0 headers) in 0,026 sec: 0 declarations; 0 references; 0 unresolved inclusions; 0 syntax errors; 0 unresolved names (0%)

2) Based on this "bad index" Sloeber tries to add libraries (but doesn't. I know because when I run make in the workspace it fails because of missing libraries)

3) The build starts and fails (due to the missing libraries) and this somehow causes the exception.

Note that the tests I got to work do not rely on the indexer to get libraries attached.

Here is the github pull request that caused the issue.

Thanks

Jantje

Op 27/08/2020 om 20:20 schreef Jonah Graham:
I don't fully understand the context of the failures, but the error log has this fairly critical error with no explanation of why it may be happening:

Root exception:
java.lang.IllegalStateException: Workbench has not been created yet.
at org.eclipse.ui.PlatformUI.getWorkbench(PlatformUI.java:95)
at org.eclipse.cdt.internal.ui.viewsupport.CDTContextActivator.install(CDTContextActivator.java:65)
at org.eclipse.cdt.ui.CUIPlugin.start(CUIPlugin.java:596)

Perhaps something in about the change you have made changes how Eclipse is being bootstrapped causing the UI not to load. 

Do you have a branch I can see the change on?

Thanks,
Jonah

~~~
Jonah Graham
Kichwa Coders
www.kichwacoders.com


On Thu, 27 Aug 2020 at 14:08, Jan Baeyens <[hidden email]> wrote:
Hi

In my Sloeber plugin I have changed the project creation code to
restrict to API usage and Since I have done so the maven build fails due
to tests failing.

When I run the test from the eclipse UI they run fine. But run from
maven I see following errors in the log.

What I guess that happens is that the build/indexer fails and wants to
report the error and that somewhere fails.

I attached the log.

Is this a known issue?

What is the best way to see the console output in this case?

Best regards

Jantje

FYI The test script try to build each project 3 times

_______________________________________________
cdt-dev mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/cdt-dev

_______________________________________________
cdt-dev mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/cdt-dev
_______________________________________________
cdt-dev mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/cdt-dev

_______________________________________________
cdt-dev mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/cdt-dev

_______________________________________________
cdt-dev mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/cdt-dev