def ingest_readings_from_fogbench(self, fledge_url, wait_time):
    pause_for_x_seconds(x=(wait_time * 3))
    conn = http.client.HTTPConnection(fledge_url)
    subprocess.run(['cd $FLEDGE_ROOT/extras/python; python3 -m fogbench -t ../../data/{}; cd -'.format(self.FOGBENCH_TEMPLATE)], shell=True, check=True, stdout=subprocess.DEVNULL)
    pause_for_x_seconds(x=wait_time)
    conn.request('GET', '/fledge/asset')
    r = conn.getresponse()
    assert (200 == r.status)
    r = r.read().decode()
    val = json.loads(r)
    assert (1 == len(val))
    assert (self.ASSET_NAME == val[0]['assetCode'])
    assert (1 == val[0]['count'])
    conn.request('GET', '/fledge/asset/{}'.format(self.ASSET_NAME))
    r = conn.getresponse()
    assert (200 == r.status)
    r = r.read().decode()
    val = json.loads(r)
    assert (1 == len(val))
    assert ({'sensor': self.SENSOR_VALUE} == val[0]['reading'])
def ingest_readings_from_fogbench(self, fledge_url, wait_time):
    pause_for_x_seconds(x=(wait_time * 3))
    conn = http.client.HTTPConnection(fledge_url)
    subprocess.run(['cd $FLEDGE_ROOT/extras/python; python3 -m fogbench -t ../../data/{}; cd -'.format(self.FOGBENCH_TEMPLATE)], shell=True, check=True, stdout=subprocess.DEVNULL)
    pause_for_x_seconds(x=wait_time)
    conn.request('GET', '/fledge/asset')
    r = conn.getresponse()
    assert (200 == r.status)
    r = r.read().decode()
    val = json.loads(r)
    assert (1 == len(val))
    assert (self.ASSET_NAME == val[0]['assetCode'])
    assert (1 == val[0]['count'])
    conn.request('GET', '/fledge/asset/{}'.format(self.ASSET_NAME))
    r = conn.getresponse()
    assert (200 == r.status)
    r = r.read().decode()
    val = json.loads(r)
    assert (1 == len(val))
    assert ({'sensor': self.SENSOR_VALUE} == val[0]['reading'])