Ubuntu Build is stuck on test phase

marcsllite's Avatar

marcsllite

09 Jul, 2021 07:17 PM

I am creating a Javafx application which opens and closes windows during my tests. I am testing on Windows, Mac and Ubuntu and the build completes fine on windows and mac but always gets stuck on the first test until I have to cancel it or it stays like that for an hour and fails.

You can see one of my builds here: https://ci.appveyor.com/project/Marcsllite/rad-shipment-calc/builds...

I have tried running the tests on different Ubuntu images, removing the first test file to see if it was related to that, and adding export DISPLAY=:99.0 like I had to for my travis builds. I looked through the discussions and couldn't find any that helped me. I believe this has something to do with needing a gui for the tests but I am not sure. Any assistance would be greatly appreciated.

  1. Support Staff 1 Posted by Feodor Fitsner on 11 Jul, 2021 11:24 PM

    Feodor Fitsner's Avatar

    It could be Build Agent crashes on Ubuntu, for some reason. Try enabling SSH to the build worker and then check build agent logs:

    journalctl -u appveyor-build-agent -n 100
    
  2. 2 Posted by marcsllite on 15 Jul, 2021 02:37 PM

    marcsllite's Avatar

    It looks like the build agent doesn't show that it crashed. I think it's a maven issue.

    Jul 13 18:41:14 appveyor-vm appveyor-build-agent[698]: ==========================================
    Jul 13 18:41:14 appveyor-vm appveyor-build-agent[698]: Command (hide_output: False): unset JAVA_TOOL_OPTIONS &&
    Jul 13 18:41:14 appveyor-vm appveyor-build-agent[698]: mvn clean verify
    Jul 13 18:41:14 appveyor-vm appveyor-build-agent[698]: ==========================================
    Jul 13 18:41:14 appveyor-vm appveyor-build-agent[698]: Current dir: /home/appveyor/projects/rad-shipment-calc
    Jul 13 18:41:14 appveyor-vm appveyor-build-agent[698]: appveyor-build-agent Information: 0 : Export current directory: /home/appveyor/projects/rad-shipment-calc
    Jul 13 18:41:14 appveyor-vm appveyor-build-agent[698]: appveyor-build-agent Information: 0 :
    Jul 13 18:41:14 appveyor-vm appveyor-build-agent[698]: Export current directory: /home/appveyor/projects/rad-shipment-calc
    Jul 13 18:41:14 appveyor-vm appveyor-build-agent[698]: appveyor-build-agent Information: 0 :
    Jul 13 18:41:14 appveyor-vm appveyor-build-agent[698]: Export environment variables (100)
    Jul 13 18:41:14 appveyor-vm appveyor-build-agent[698]: appveyor-build-agent Information: 0 : Export environment variables (100)
    Jul 13 18:41:14 appveyor-vm appveyor-build-agent[698]: appveyor-build-agent Information: 0 :
    Jul 13 18:41:14 appveyor-vm appveyor-build-agent[698]: Export command: unset JAVA_TOOL_OPTIONS && 
                                                                                                mvn clean verify
    Jul 13 18:41:14 appveyor-vm appveyor-build-agent[698]: appveyor-build-agent Information: 0 : Export command: unset JAVA_TOOL_OPTIONS &&
    Jul 13 18:41:14 appveyor-vm appveyor-build-agent[698]: mvn clean verify
    Jul 13 18:41:14 appveyor-vm appveyor-build-agent[698]: appveyor-build-agent Information: 0 :
    Jul 13 18:41:14 appveyor-vm appveyor-build-agent[698]: Waiting for command to complete...
    Jul 13 18:41:14 appveyor-vm appveyor-build-agent[698]: appveyor-build-agent Information: 0 : Waiting for command to complete...
    Jul 13 18:41:14 appveyor-vm appveyor-build-agent[698]: appveyor-build-agent Information: 0 :
    Jul 13 18:41:14 appveyor-vm appveyor-build-agent[698]: Importing current directory
    Jul 13 18:41:14 appveyor-vm appveyor-build-agent[698]: appveyor-build-agent Information: 0 : Importing current directory
    

    I looked into maven test freezing and followed this guide i found which showed me that this is all caused by JavaFX waiting for the start of the fx thread.

    I updated my tests to use junit 5 and started using xvfb for the display
    Xvfb :99 & export DISPLAY=:99 and everything is working fine. Thanks for the assistance

  3. marcsllite closed this discussion on 15 Jul, 2021 02:37 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac