Page MenuHomePhabricator

installing the extension breaks regression testing.
Closed, ResolvedPublic

Description

Author: ssanbeg

Description:
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.


Version: unspecified
Severity: normal

Details

Reference
bz8010

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:29 PM
bzimport set Reference to bz8010.

ssanbeg wrote:

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.

Attached:

robchur wrote:

*** 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).