cxbrooks / test

Second test for bugzilla to git
0 stars 0 forks source link

Svn update hangs if Wi-Fi active, but not connected to the outside world #14

Open cxbrooks opened 6 years ago

cxbrooks commented 6 years ago

Note: the issue was created automatically with bugzilla2github tool

Original bug ID: BZ#545 From: @cxbrooks Reported version: unspecified CC: accessors-devel@terraswarm.org

cxbrooks commented 6 years ago

Edward wrote:

"If I have wifi on and connected to an access point but not to the internet (e.g. to United's wifi network on a plane), then opening a model stalls forever trying to update the accessors SVN repo. Perhaps it needs a timeout, rather than just responding to an error?"

The workaround is to set the PT_NO_NET environment variable. I updated JSAccessor.java so that a message is printed:

--start-- bash-3.2$ rm $PTII/org/terraswarm/accessor/accessors/web/Accessor_1.dtd bash-3.2$ $PTII/bin/capecode $PTII/org/terraswarm/accessor/demo/AugmentedReality/AugmentedRealityKeyValueStore.xml Updating local copy of the accessors repository. JSAccessor: If running svn hangs, then try setting the PT_NO_NET environment variable to skip running svn and jsdoc. In "/Users/cxh/src/ptII11.0.devel/org/terraswarm/accessor/accessors", about to execute: svn update --non-interactive --trust-server-cert --accept postpone Updating '.': Restored 'web/Accessor_1.dtd' --end--

The real fix would be to use the java.lang.Process waitFor(long timeout, TimeUnit unit) method. To do this would require modifying ptolemy/util/StreamExec.java so that the timeout can be set. Really, the ExecuteCommands interface should be updated and all the derived classes should use this method.