tests: add some logs to debug some sporadic test failures
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
parent
ba472c3c67
commit
5f30ea3658
2 changed files with 4 additions and 2 deletions
|
@ -314,7 +314,7 @@ func TestTransferCheckerTransferQuota(t *testing.T) {
|
||||||
transfer1.BytesReceived.Store(1024*1024 + 1)
|
transfer1.BytesReceived.Store(1024*1024 + 1)
|
||||||
transfer2.BytesReceived.Store(0)
|
transfer2.BytesReceived.Store(0)
|
||||||
Connections.checkTransfers()
|
Connections.checkTransfers()
|
||||||
assert.True(t, conn1.IsQuotaExceededError(transfer1.errAbort))
|
assert.True(t, conn1.IsQuotaExceededError(transfer1.errAbort), transfer1.errAbort)
|
||||||
assert.Nil(t, transfer2.errAbort)
|
assert.Nil(t, transfer2.errAbort)
|
||||||
transfer1.errAbort = nil
|
transfer1.errAbort = nil
|
||||||
transfer1.BytesReceived.Store(1024*1024 + 1)
|
transfer1.BytesReceived.Store(1024*1024 + 1)
|
||||||
|
|
|
@ -10378,7 +10378,9 @@ func TestSCPTransferQuotaLimits(t *testing.T) {
|
||||||
user, _, err = httpdtest.GetUserByUsername(user.Username, http.StatusOK)
|
user, _, err = httpdtest.GetUserByUsername(user.Username, http.StatusOK)
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
assert.Greater(t, user.UsedDownloadDataTransfer, int64(1024*1024))
|
assert.Greater(t, user.UsedDownloadDataTransfer, int64(1024*1024))
|
||||||
assert.Greater(t, user.UsedUploadDataTransfer, int64(1024*1024))
|
if !assert.Greater(t, user.UsedUploadDataTransfer, int64(1024*1024)) {
|
||||||
|
printLatestLogs(30)
|
||||||
|
}
|
||||||
|
|
||||||
err = os.Remove(testFilePath)
|
err = os.Remove(testFilePath)
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
|
|
Loading…
Reference in a new issue