mirror of
https://github.com/blockchain-etl/ethereum-etl.git
synced 2026-01-09 13:57:54 -05:00
Fix slow tests
This commit is contained in:
@@ -78,6 +78,7 @@ For the latest version, check out the repo and call
|
||||
```bash
|
||||
> pip3 install -e .[dev,streaming]
|
||||
> export ETHEREUM_ETL_RUN_SLOW_TESTS=True
|
||||
> export PROVIDER_URL=<your_porvider_uri>
|
||||
> pytest -vv
|
||||
```
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ def get_web3_provider(provider_type, read_resource_lambda=None, batch=False):
|
||||
else:
|
||||
provider = MockWeb3Provider(read_resource_lambda)
|
||||
elif provider_type == 'infura':
|
||||
provider_url = os.environ.get('PROVIDER_URL', 'https://mainnet.infura.io')
|
||||
provider_url = os.environ.get('PROVIDER_URL', 'https://mainnet.infura.io/v3/7aef3f0cd1f64408b163814b22cc643c')
|
||||
if batch:
|
||||
provider = BatchHTTPProvider(provider_url)
|
||||
else:
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
|
||||
import os
|
||||
|
||||
import pytest
|
||||
from dateutil.parser import parse
|
||||
@@ -75,5 +75,6 @@ def test_get_block_range_for_timestamps_fail(start_timestamp, end_timestamp):
|
||||
|
||||
|
||||
def get_new_eth_service():
|
||||
web3 = Web3(HTTPProvider('https://mainnet.infura.io'))
|
||||
provider_url = os.environ.get('PROVIDER_URL', 'https://mainnet.infura.io/v3/7aef3f0cd1f64408b163814b22cc643c')
|
||||
web3 = Web3(HTTPProvider(provider_url))
|
||||
return EthService(web3)
|
||||
|
||||
Reference in New Issue
Block a user