question

hanksc avatar image
hanksc asked hanksc posted

Block mapper exceeded maximum search time

I'm getting an error that the block mapper has exceeded the maximum search time.  My response is only 7 lines long and I only have 2 blocks in the root container.  The first is an optional line (which is the first of the 7 lines) the second block is a pair of lines that is repeated 3 times in the response. 

 

I have no idea why it is timing out.  I added this response to the samples for this response map and it maps fine there.

iTestresponse map
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

hanksc avatar image
hanksc answered hanksc posted

1) What is the maximum search time set for your block map?

The default 60 second.

2) Are you certain this same map is used in your test case?  In your test case, select the step with this response, look at the structure data view in plain text mode.  There should be a mappingInfo node which tells you which response map is being used to map this step.  Is it the same map as the one you attached?

Yes, it is using this response map.

3) Is the actual response identical to sample3?

Yes, I copied it straight from the response view.  The first line of the response is actually an overflow from the command which is longer that the width of the window.

 

Your 'new' response map works fine in the response mapping window, but when I ran it, it came back withan expected punctuation token ****************************; Received Word Token mysql in block rows, line 0, col 0  (Number of * is approximate)

 

 

9 comments
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

YujieL avatar image YujieL commented ·

Can you turn on the heap status on?  Go to Window->Preferences.  On the General page, check the "Show heap status" checkbox. 

After you enable this feature, you'll see the heap status information on the bottom of the iTest window.  It tells you how much memory is being used.  Next time you run your test case, can you tell me what the heap status looks like?  I suspect that your test case is using most of the available memory so that mapping becomes really slow.

0 Likes 0 ·
hanksc avatar image hanksc YujieL commented ·
Just before starting the testcase 82M of 95M.  Once the code started it jumped then fell down to ~75M of 108M.  While it was thinking about the response map it varried between 73M and 80M of 108M.
0 Likes 0 ·
hanksc avatar image hanksc hanksc commented ·
The reason that variable line exists in the first place is that some of the commands which use this response map are longer than the width of the window and get counted as part of the response.  Is there a way to have iTest not count them as part of the response?
0 Likes 0 ·
KumarS avatar image KumarS hanksc commented ·

Yes - by default the terminal width is variable in iTest. You can set to a fixed width with a larger number for your session profile so that your command does not wrap and hence become part of the response.

 

 

 

 

0 Likes 0 ·
termwidth.JPG (36.1 KiB)
KumarS avatar image KumarS KumarS commented ·
Memory does not seem to be an issue in this case from the info you sent. If you increase the timeout to larger than 60 seconds, does it work?
0 Likes 0 ·
hanksc avatar image hanksc KumarS commented ·

I just did this (increaded the terminal width) and it works.

 

It would be much nicer if iTest "knew" that the command was not part of the response, and therefor did not try to response map it, no matter how many lines it is on.

Message Edited by hanksc on 02-27-2009 03:21 PM
0 Likes 0 ·
KumarS avatar image KumarS hanksc commented ·
We are working on adding that intelligence to iTest in a future release.
0 Likes 0 ·
KumarS avatar image KumarS KumarS commented ·
Does your map work now - or are you still having timeout issues?
0 Likes 0 ·
hanksc avatar image hanksc KumarS commented ·
I've removed the optional line part of the block, and it works now without even a noticeable delay.
0 Likes 0 ·
hanksc avatar image
hanksc answered hanksc posted
I've attached the response map.  The response in sample3 is the one that is timing out.

2 comments
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

YujieL avatar image YujieL commented ·

If the sample maps fine in the response map editor, then there is something else going on.

 

1) What is the maximum search time set for your block map?

2) Are you certain this same map is used in your test case?  In your test case, select the step with this response, look at the structure data view in plain text mode.  There should be a mappingInfo node which tells you which response map is being used to map this step.  Is it the same map as the one you attached?

3) Is the actual response identical to sample3?

0 Likes 0 ·
YujieL avatar image YujieL YujieL commented ·

On a side note, your response map looks good, but it is important to know that wildcards (allow token or line to be any content) is generally expensive.  Although you can't avoid it with the kind of response you have, I've tweaked the map just a little bit to make it faster.  Instead of taking 5 seconds to map on my computer, now it maps instantaneously.  I just removed a couple of places that you're using wildcard based on the three samples you provided.  Of course you should double check that my changes will work for all the responses you're using with this map.

 

 

0 Likes 0 ·
PaulD avatar image
PaulD answered PaulD posted

Can you post your response map so that we can take a look?

 

10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.