Last modified: 2007-04-17 07:37:38 UTC
Simply installing this extension breaks all regression testing. This is beacause the extension does a lot of work when the module is loaded, and none when it is initialised; including making SQL queries for things that won't be in the regression test DB.
Created attachment 2757 [details] patch to defer initialisation This patch moves most of the initialisation into a swmfInit function, and defines a few globals that are needed for it to work. It's been lightly tested, to ensure that it loads correctly and doesn't mess up regresssion tests. I don't know if it's possible yet to regression test the extension, though.
*** Bug 9335 has been marked as a duplicate of this bug. ***
The current version almost fixes this, since it abolishes SMWLocalSettings.php and reduces enabling of the extension to a single function call. I will take care of moving this into the extensionfunction hook as well. Also, we are about to move to a complete storage abstraction achitecture, which replaces virtually all specific SQL calls by calls to one storage accessing object. Implementing a dummy or testing object with the same interface would enable some sort of regression testing even without an initialised database.
SMW now does all initialisation in the extension hook, and does no longer require any patching of MW or any addtional configuration file (was: "SMWLocalSettings"). There should not be SQL queries during initialisation -- please report this as a bug if it occurs again.
SMW can now be run with a fully virtual store by setting the following in LocalSettings (after including SMW_Settings.php): $smwgDefaultStore = SMW_STORE_TESTING; This will prevent any undesired DB access, and enables parser testing without crashes. This setting might be done automatically during parser tests in the future (if there is a way to find out that we are running within such a test).