CodeIgniter Forums
Testing Header Redirect / Reload with SimpleTest in CI - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Testing Header Redirect / Reload with SimpleTest in CI (/showthread.php?tid=47448)



Testing Header Redirect / Reload with SimpleTest in CI - El Forum - 12-08-2011

[eluser]Unknown[/eluser]
Hello !

I have a script which is formating a rather large number of DB entries (1000 - sometimes much more) and have recently run into timeout problems with my script.

The approach I have choosen now is:
The Script uses register_shutdown_function() to register a function which is executed whenever the timeout occures.
There I pass a param via flashvar to the next page (actually the identical page) and reload the page via header redirect.
After a number of reloads (because of the max. time a page can be reloaded in e.g. the firefox browser) the user gets the option to continue via a link.

So basically I have a script running which will continuously be called again by a header redirect (which of course whould redirct the page to its controller, terminating my test suit execution.
How should I approach this problem when developing my tests ?

thanks for any idea !

regards,
matthias