Skip to content

Commit

Permalink
Add logging to figure out why test are failing in prod
Browse files Browse the repository at this point in the history
  • Loading branch information
flea89 committed Oct 25, 2022
1 parent 694788e commit 2fe2914
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/cron/src/jobs/pins-backup.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export default class Backup {
this.BLOCK_TIMEOUT = 1000 * 30 // timeout if we don't receive a block after 30s
this.REPORT_INTERVAL = 1000 * 60 // log download progress every minute
this.MAX_UPLOAD_DAG_SIZE = 1024 * 1024 * 1024 * 32 // We don't limit in psa pin transfers in this case, but we still want to log if we have larger pin requests.
this.log = debug('backup:pins')
this.log = console.log
this.env = env
this.LIMIT = env.QUERY_LIMIT !== undefined ? env.QUERY_LIMIT : 10000
this.GET_PINNED_PINS_QUERY = `
Expand Down
4 changes: 3 additions & 1 deletion packages/cron/test/pins-backup.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import { CID } from 'multiformats'
import { sha256 } from 'multiformats/hashes/sha2'
import * as pb from '@ipld/dag-pb'

process.env.DEBUG = 'backup:pins'

const env = {
...process.env,
DEBUG: 'backup:pins',
Expand Down Expand Up @@ -72,7 +74,7 @@ async function createDagsAndRequests (files, authKey, cluster, dbClient, {
return fileContentMap
}

describe('cron - pins backup', () => {
describe.only('cron - pins backup', () => {
let user, userId, authKey, dbClient, cluster, backup, rwPg, roPg

before(async () => {
Expand Down

0 comments on commit 2fe2914

Please sign in to comment.