Prevent DFEs from triggering during unit test


#1

In a package that depends on energyManagement I have a unit test that sets up some PointMeasurements to test a SimpleMetric, but when I try running the unit test with the Jasmine tester I get the following error:

unable to preprocess sources for 15 DFEs:

C3RuntimeException: unable to load metric 'BilledNaturalGasSpendingAnomalyScore' for ID 0ca40c45-0ffe-4822-2403-0165ca13e203-0 (start 2015-09-01T00:00:00.000Z, end 2018-10-01T00:00:00.000Z):

C3RuntimeException: c3.love.exceptions.C3RuntimeException: c3.love.exceptions.C3RuntimeException: Failed during the creation of ActionRuntime 'Obj<ActionRuntime> [,]', a_step='environment creation', a_error='c3.love.exceptions.C3RuntimeException: Error executing command: /usr/local/share/c3/conda/bin/conda env create -p /usr/local/share/c3/condaEnvs/osep/prod/py-server -q --file /tmp/72ed0388-fd90-485c-ae7c-6a3fd1dd436a/requirements.yaml
CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://artifacts.c3-e.com/v1/anaconda/linux-64/repodata.json>
Elapsed: -
An HTTP error occurred when trying to retrieve this URL.
HTTP errors are often intermittent, and a simple retry will get you on your way.
ConnectTimeout(MaxRetryError("HTTPSConnectionPool(host='artifacts.c3-e.com', port=443): Max retries exceeded with url: /v1/anaconda/linux-64/repodata.json (Caused by ConnectTimeoutError(<requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f67a255add0>, 'Connection to artifacts.c3-e.com timed out

Even when connected to the network I end up getting this error, no matter how many times I’ve retried. Is there a way to disable DFE’s from triggering so that this doesn’t happen during the unit test?


#2

c3ShowType(TestApi)

Use [AnalyticsQueue] as the third argument of TestApi.createContext(filename, parent, queueBlacklist)