Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests hang after successful completion #9540

Closed
2 tasks done
lukas2 opened this issue Jun 21, 2017 · 7 comments
Closed
2 tasks done

Tests hang after successful completion #9540

lukas2 opened this issue Jun 21, 2017 · 7 comments

Comments

@lukas2
Copy link

lukas2 commented Jun 21, 2017

New Issue Checklist

Issue Description

We are running unit tests (using Jenkins) on a iPhone Simulator and afterwards, triggered by a successful run, on an iPad Simulator. (Reason: Different codepaths when running on iPad.)

iPhone is ok, but the iPad run almost always hangs forever after all tests have been executed successfully. Are we missing something? This has been the case with every fastlane update since April or so.

@fastlane-bot
Copy link

It seems like you have not included the output of fastlane env

To make it easier for us help you resolve this issue, please update the issue to include the output of fastlane env 👍

@lukas2
Copy link
Author

lukas2 commented Jun 21, 2017

Here you go (redacted it a bit, removed Actions and identifier.)

✅ fastlane environment ✅

Stack

Key Value
OS 10.12.5
Ruby 2.4.0
Bundler? false
Git git version 2.11.0 (Apple Git-81)
Installation Source /usr/local/bin/fastlane
Host Mac OS X 10.12.5 (16F73)
Ruby Lib Dir /usr/local/Cellar/ruby/2.4.0/lib
OpenSSL Version OpenSSL 1.0.2j 26 Sep 2016
Is contained false
Is homebrew false
Is installed via Fabric.app false
Xcode Path /Applications/Xcode.app/Contents/Developer/
Xcode Version 8.3.3

System Locale

Variable Value
LANG de_DE.UTF-8
LC_ALL
LANGUAGE

fastlane files:

`./fastlane/Fastfile`
#update_fastlane

require 'fileutils'
FileUtils.rm_rf File.join(__dir__, '../Pods')

cocoapods

default_platform :ios

platform :ios do

  desc "Runs unit tests on iphone"
  lane :test do
     scan(
      scheme: "Develop",
      devices: ["iPhone 7"]
    )
  end

  desc "Runs unit tests on ipad"
  lane :test_ipad do
     scan(
      scheme: "Develop",
      devices: ["iPad Pro (12.9 inch)"]
    )
  end

end
`./fastlane/Appfile`
app_identifier “CEN.SOR.ED;) # The bundle identifier of your app

fastlane gems

Gem Version Update-Status
fastlane 2.39.2 ✅ Up-To-Date

Loaded fastlane plugins:

No plugins Loaded

Loaded gems
Gem Version
did_you_mean 1.1.0
slack-notifier 1.5.1
claide 1.0.1
colored2 3.1.2
nanaimo 0.2.3
xcodeproj 1.4.4
rouge 1.11.1
xcpretty 0.2.4
terminal-notifier 1.7.1
plist 3.2.0
multipart-post 2.0.0
word_wrap 1.0.0
tty-screen 0.5.0
babosa 1.0.2
colored 1.2
highline 1.7.8
commander-fastlane 4.4.4
excon 0.55.0
faraday 0.11.0
unf_ext 0.0.7.2
unf 0.1.4
domain_name 0.5.20170223
http-cookie 1.0.3
faraday-cookie_jar 0.0.6
fastimage 2.1.0
uber 0.0.15
declarative 0.0.9
declarative-option 0.1.0
representable 3.0.4
retriable 2.1.0
public_suffix 2.0.5
addressable 2.5.1
mime-types-data 3.2016.0521
mime-types 3.1
little-plugger 1.1.4
multi_json 1.12.1
logging 2.2.0
jwt 1.5.6
memoist 0.15.0
os 0.9.6
signet 0.7.3
googleauth 0.5.1
httpclient 2.8.3
google-api-client 0.12.0
json 2.0.2
mini_magick 4.5.1
multi_xml 0.6.0
rubyzip 1.2.1
security 0.1.3
xcpretty-travis-formatter 0.0.4
dotenv 2.2.0
bundler 1.14.6
faraday_middleware 0.11.0.1
io-console 0.4.6
openssl 2.0.2
terminal-table 1.8.0
unicode-display_width 1.2.1

generated on: 2017-06-21

@taquitos
Copy link
Collaborator

Could you also include log output (redacted personal info of course)?
Troubleshooting-wise, have you tried enabling just one single simple test, like testing true == true and then testing to see if the sims hang after success? This could help narrow down where the issue is occurring.

Maybe you can also try running fastlane snapshot reset_simulators to clear out any bad state.

@lukas2
Copy link
Author

lukas2 commented Jul 4, 2017

Yes, tried resetting. I think my problem might be this here: #5173 Killing the simulator leads to test being completed successfully. Also this: xcpretty/xcpretty#227

And as for output, it stops here:

// all the other tests being run..
[13:45:30]: ▸ �[35m�[32;1m✓�[0m testGetCallsErrorHandler (0.001 seconds)�[0m
[13:45:30]: ▸ �[35m�[32;1m Executed 1991 tests, with 0 failures (0 unexpected) in 37.387 (38.376) seconds�[0m
[13:45:30]: ▸ �[35m�[0m

@lukas2
Copy link
Author

lukas2 commented Jul 18, 2017

For now, I worked around this problem with a few shell commands (this is from our Jenkins "ipad-tests" job):

sh -c "sleep 360 ; killall Simulator" &
PID=$!
fastlane test_ipad

if ps -p $PID > /dev/null
then
echo Killing ipad test monitor/killscript..
kill $PID
fi

The idea is from @carsten-wenderdel posting here: #5173 (comment)

@fastlane-bot
Copy link

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.

Please make sure to update to the latest fastlane version and check if that solves the issue. Let us know if that works for you by adding a comment 👍

@fastlane-bot
Copy link

This issue will be auto-closed because there hasn't been any activity for a few months. Feel free to open a new one if you still experience this problem 👍

@fastlane fastlane locked and limited conversation to collaborators Nov 24, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants