timeout

How to test timeout() in a rxjs pipe with jasmine-marbles

女生的网名这么多〃 提交于 2020-02-25 13:36:07
问题 I have written a pipe that filters an input observable. In the pipe I specify a timeout with the timeout() operator to abort waiting if the expected value is not emitted by the source in time. I want to test the timeout case with jasmine-marbles, but I can't get it to work. I believe that expect(source).toBeObservable() evaluates before the source emits. see Stackblitz The pipe to be tested: source = cold('a', { a: { id: 'a' } }).pipe( timeout(500), filter((a) => false), catchError((err) => {

AS3 URLRequest Timeout (not AIR)

半城伤御伤魂 提交于 2020-02-25 05:03:39
问题 I am building a web-app that should send some data to the server. Flash has a built in timeout limit for URLRequest set to 30 seconds. I cannot use AIR (as this solution should run from the browser) and sometimes the request is for more than 30seconds. Flash ignores any data received after 30 seconds and sends an IO Error event although when I check the server, the script would have been executed. Is there any solution to modify the timeout limit? Maybe a smarter way? (any libraries to divide

AS3 URLRequest Timeout (not AIR)

核能气质少年 提交于 2020-02-25 05:02:14
问题 I am building a web-app that should send some data to the server. Flash has a built in timeout limit for URLRequest set to 30 seconds. I cannot use AIR (as this solution should run from the browser) and sometimes the request is for more than 30seconds. Flash ignores any data received after 30 seconds and sends an IO Error event although when I check the server, the script would have been executed. Is there any solution to modify the timeout limit? Maybe a smarter way? (any libraries to divide

Angular 1.5 timeout using a HttpInterceptor

浪尽此生 提交于 2020-02-15 13:44:50
问题 All, i am trying to setup a global httpInterceptor to have a custom popup message when a client timeout appears, not a server one. I found this article: Angular $http : setting a promise on the 'timeout' config , and converted it into a httpInterceptor, but it does not work as expected and has some weird behavior. $provide.factory('timeoutHttpInterceptor', function ($q, $translate, $injector) { var timeout = $q.defer(); var timedOut = false; setTimeout(function () { timedOut = true; timeout

Angular 1.5 timeout using a HttpInterceptor

情到浓时终转凉″ 提交于 2020-02-15 13:44:38
问题 All, i am trying to setup a global httpInterceptor to have a custom popup message when a client timeout appears, not a server one. I found this article: Angular $http : setting a promise on the 'timeout' config , and converted it into a httpInterceptor, but it does not work as expected and has some weird behavior. $provide.factory('timeoutHttpInterceptor', function ($q, $translate, $injector) { var timeout = $q.defer(); var timedOut = false; setTimeout(function () { timedOut = true; timeout

Angular 1.5 timeout using a HttpInterceptor

回眸只為那壹抹淺笑 提交于 2020-02-15 13:44:35
问题 All, i am trying to setup a global httpInterceptor to have a custom popup message when a client timeout appears, not a server one. I found this article: Angular $http : setting a promise on the 'timeout' config , and converted it into a httpInterceptor, but it does not work as expected and has some weird behavior. $provide.factory('timeoutHttpInterceptor', function ($q, $translate, $injector) { var timeout = $q.defer(); var timedOut = false; setTimeout(function () { timedOut = true; timeout

Spark Socket Timeout issue while writing to hdfs

☆樱花仙子☆ 提交于 2020-02-08 03:11:19
问题 I am trying to process a hive query and write to HDFS as ORC format. But I am getting a timeout issue. I checked in spark-default.conf ,but there is no timeout settings, should i add it? Please let me know the changes to make temp = sqlContext.sql(""" query """) temp.write.format("orc").option("header", "true").save("hdfs://app/Quality/spark_test/") Attached is the log of the error : org.apache.hadoop.net.ConnectTimeoutException: Call From .. to app:8020 failed on socket timeout exception:

Perl Mechanize timeout not working with https

三世轮回 提交于 2020-02-08 02:40:07
问题 I've been using Perl's Mechanize library but for some reason with https the timeout parameter (I'm using Crypt::SSLeay for SSL). my $browser = WWW::Mechanize->new(autocheck=>0, timeout=>3); Has anyone encountered this before and knows how to fix it? Thanks! 回答1: For HTPS/SSL you have to do some workaround: my $html = `wget -q -t 1 -T $timeout -O - $url`; mech->get(0); $mech->update_html($html); 回答2: In just testing it now against https://www.sourceforge.net/, I get the impression that the

How to timeout a tail pipeline properly on shell

时光怂恿深爱的人放手 提交于 2020-02-06 08:48:13
问题 I am implementing monitor_log function which will tail the most recent line from running log and check required string with while loop, the timeout logic should be when the tail log running over 300 seconds, it must close the tail and while loop pipeline. The big issue i found is for some server the running log NOT keep generating, which means tail -n 1 -f "running.log" will also NOT generate output for while loop to consume, hence the timeout checking logic if [[ $(($SECONDS - start_timer))

How to timeout a tail pipeline properly on shell

佐手、 提交于 2020-02-06 08:44:21
问题 I am implementing monitor_log function which will tail the most recent line from running log and check required string with while loop, the timeout logic should be when the tail log running over 300 seconds, it must close the tail and while loop pipeline. The big issue i found is for some server the running log NOT keep generating, which means tail -n 1 -f "running.log" will also NOT generate output for while loop to consume, hence the timeout checking logic if [[ $(($SECONDS - start_timer))