Cypress Time out not respecting the value given on command - timeout

Since our test agents are slow some times- i am trying to add some additional time outs for some commands
I did it like using time out value on command as shown below.But its not respecting the value given
My understanding is cypress will wait for "10000" MS for getting the #Addstory element?
Can any one advice is this is the correct way please?
Thank you so much
cy.get('#addstory > .ng-scope').click({ timeout: 10000 })

In cypress.json file, increase the timeout to 10 seconds or what ever timeout you want like this: "defaultCommandTimeout": 10000 and save the file. Now close the app and open it again. Navigate to Settings > Configuration you should be able to see the new value set for defaultCommandTimeout.

I issue was i was adding time out on click not for getting the element when i changed like below -All good waiting for add story to be visible as i expected before click
cy.get('#addstory > .ng-scope',{ timeout: 10000 }).click()

Related

User defined script timed out. Timeout is set to 30.0 s

Hi I an integrating my python code for time series forecasting with tableau using tabpy. While executing the code as calculated field it giving this erro: "User defined script timed out. Timeout is set to 30.0 s.". I have increased timeout in default.config already. Please suggest some sulution.
It looks like the value of TABPY_EVALUATE_TIMEOUT is hard coded somewhere in the python code used for tabpy server.
check in the tabpy\tabpy_server\app\app.py file, if you find out any hard coded value there just change the number to your required value or else check in other python files in the folder for the hard coded value and change it.
Incase you didn't find that path check in the log file of the tabpy, you will get to know that path.
According to the documentation you can set this parameter in your configuration file and when you launch Tabpy from the command line, just specify absolute to your configuration file like this: tabpy --config=absolute/path/to/your/config/file.conf
You can find a configuration file example under the link above. The parameter which you need to set is TABPY_EVALUATE_TIMEOUT, so in your case configuration file could look like this(if you want to extend timeout time to 2 minutes, for example):
[TabPy]
TABPY_EVALUATE_TIMEOUT = 120
All other parameters will be taken from default configuration file.

Errors Thrown When Inserting Data After Tag or Edge is Created

I'm using nebula docker but it throws me an error when I connected first. Then I retried everything is ok. Why is that? Must I retry every time?
This is likely caused by setting the heartbeat_interval_secs value to fetch data from the meta server. Conduct the following steps to resolve:
If meta has registered, check heartbeat_interval_secs value in console with the following command.
nebula> GET CONFIGS storage:heartbeat_interval_secs
nebula> GET CONFIGS graph:heartbeat_interval_secs
If the value is large, change it to 1s with the following command.
nebula> UPDATE CONFIGS storage:heartbeat_interval_secs=1
nebula> UPDATE CONFIGS graph:heartbeat_interval_secs=1
Note the changes take effect in the next period.

How to make Postman/Newman to fail a test after certain time has passed?

So, in my collection I have about ten requests, with the last two being:
/Wait 10 seconds
/Check Complete
The first makes a call to the postman's echo (delay by 10 seconds) and the second is the call to my system to check for the status complete. Now, if status is unavailable I wait another 10s:
postman.setNextRequest("Wait 10 seconds");
The complete status on my system can appear in a minute or so. Now, as one can see - it is an infinite loop if something goes wrong with the system and status is never complete. Is there a way in postman/newman test to fail a test if it has been going for more than 2 minutes, for example.
Additionally, this will be executed in jenkins with command line, so I am not really looking into postman settings or delays between requests in the runner.
you may have a look to newman options here : https://www.npmjs.com/package/newman#newman-run-collection-file-source-options. The interesting option is
--timeout-request : it will surely fulfill your need.
In Postman itself, you may test the responseTime. I recall that there is a snippet, on the right part, which looks like this:
tests["Response time is less than 200ms"] = responseTime < 200;
and which could help you as the test fails if response does not occur within the requested time.
Alexandre
If you are going to be using Jenkins pipeline you can use the timeout step to cause long running jobs to result in failure, here's on for 2 mins.
timeout(120) {
node {
sh 'newman command'
}
}
Check out the "Pipeline Syntax" editor in Jenkins to generated your code block and look for other useful functions.

Multiple times trigger generation in Zabbix

I am new to zabbix. I have a basic requirement of monitoring occurrence of different log messages using zabbix. Say, when there is a log message "server starting", zabbix should show that alert. The idea is that if the server (re)starts 10 times in last 10 minutes, the zabbix dashboard (or at any other place) should display that 10 times.
I have done the following for that :
Created an item under template MyTemplate:
Type : Zabbix Agent (Active)
key : log[/opt/mylog/logs/abc.log,server starting]
Type of information : Log
Update Interval (in sec) : 30
Created a trigger with expression :
{MyTemplate:log[/opt/mylog/logs/abc.log,server
starting].logeventid(1)}=0
With logeventid(1), I am seeing that the alert (trigger) is getting generated only once. It appears only once in the Dashboard --> Last 20 issues. If I go to Monitoring --> Trigger, I see the alert only once, although the log files have 10 entries of the message "server starting" (server restarted 10 times).
Then I set the trigger to following :
{MyTemplate:log[/opt/mylog/logs/abc.log,server
starting].nodata(300)}=0
Now, at Monitoring --> Trigger, I see the alert (trigger) 10 times, but, from the Dashboard --> Last 20 issues it vanishes just after 300 seconds.
My questions are :
What should be the trigger function, I should use? I want to see 10 alerts in zabbix if the same message appears 10 times in the log file within a period of time.
With nodata(300), why does the alert vanish after 300 sec?
Is it ok if I use 30 minutes instead of 300 seconds as an argument of nodata()?
Function logeventid() is normally used for Windows and VMware event logs. In this case, it should probably not be used and it is suspicious that it fires, which might indicate a bug in Zabbix.
Anyway, you can check "Multiple PROBLEM events generation" box in trigger configuration and the trigger will generate a new PROBLEM event every time the condition is true, regardless of its previous value. Instead of logeventid(), you can try using a function that is always true, for instance, strlen()>0.
If you wish the trigger to go into OK state after some time, say, 10 minutes, you can add nodata(10m). Then your trigger will look like this:
{MyTemplate:log[/opt/mylog/logs/abc.log,server starting].strlen()}>0 and
{MyTemplate:log[/opt/mylog/logs/abc.log,server starting].nodata(10m)}=0

Timeout issue using codefirststoredprocs in MVC5/EF 6. Error reading from stored proc dbo.[...]: Timeout expired

In order to process nearly 70K records at a time, I use codefriststoredprocs 2.5.0 with my application. With few records everything works fine but with large set of data, I receive "The wait operation timed out" exception.
I tried modifying default command timeout value from 30 seconds to 600 seconds in following manner.
//Previous approach
((System.Data.Entity.Infrastructure.IObjectContextAdapter)this.db).ObjectContext.CommandTimeout = 600;
//New approach for EF 6
this.db.Database.CommandTimeout = 600;
but still receives connection timeout message after 30 seconds. I also modified web.config setting Connection timeout value to 600 seconds (I know it is a different thing than command timeout value but give it a go).
I feel like the issue is with codefirststoredprocs library that while executing stored procedure change command timeout value to default. Is there any way to fix this issue or should I go to alternate approach of using stored procedures with my application.
Thanks in advance.
First, I would like to thanks CodeFirstStoredProcs team for their effort and collaboration to solve this issue.
I guess, as mentioned earlier, the command timeout values might have been defaulted to 30 seconds inside CodeFirstStoredProcs library.
With their new release (version 2.6),they have added ‘command timeout’ parameter to the CallStoredProc<> method, that helped me set a default value for commandtimeout
and finally solved my issue.
To process nearly 70K records in my case, I set CommandTimeout = 0 to CallStoredProc<> method. This adds an infinite waiting time to execute stored
procedure.
Thanks once again for CodeFirstStoredProcs team. :)
I got the same problem when changing to EF6.
Your might be setting the CommandTimeout in wrong place. Try setting the CommandTimeout where you are creating the context, like this:
var context = new Entities();
context.CommandTimeout = 600;
Also check if the CommandTimeout was changed with your approach after creating the context. If so then there might be some other issue.

Resources