Skip to content

Instantly share code, notes, and snippets.

View dzieciou's full-sized avatar

Maciej Gawinecki dzieciou

View GitHub Profile
name: test
on: pull_request
jobs:
test:
runs-on: ubuntu-latest
steps:
#----------------------------------------------
# check-out repo and set-up python
@dzieciou
dzieciou / middlewares.py
Created November 15, 2019 14:01
Monitoring Scrapy failed URLs
class FailedStatsMiddleware(object):
def __init__(self, stats):
self.stats = stats
EXCEPTIONS_TO_FAIL = RetryMiddleware.EXCEPTIONS_TO_RETRY
def __init__(self, settings):
self.failure_http_codes = set(range(400, 600))
package com.testing.listeners;
import org.testng.IInvokedMethod;
import org.testng.IInvokedMethodListener;
import org.testng.ITestResult;
import java.util.Optional;
public class MyListener implements IInvokedMethodListener {