This fixes the observed errors in testConnectionActivityLogging.psql by limiting the second import to CURRENT_DATE. There may be a more robust way perform this test, but I would need more time to analyze the issue.
In a nutshell, I believe what was happening is that when there are connections in ClassDB.ConnectionActivity that are at least two days old, importConnectionLog() will always return more than one row. The issue arises when the first import is performed. If there are no current users with connection activity on the dates imported, then no rows are added to ClassDB.ConnectionActivity. Thus, when importConnectionLog() is run in the test proper, more than one row is returned, which is an error.
This is definitely a test design issue rather than a ClassDB issue, however.
This fixes the observed errors in
testConnectionActivityLogging.psql
by limiting the second import toCURRENT_DATE
. There may be a more robust way perform this test, but I would need more time to analyze the issue.In a nutshell, I believe what was happening is that when there are connections in
ClassDB.ConnectionActivity
that are at least two days old,importConnectionLog()
will always return more than one row. The issue arises when the first import is performed. If there are no current users with connection activity on the dates imported, then no rows are added toClassDB.ConnectionActivity
. Thus, whenimportConnectionLog()
is run in the test proper, more than one row is returned, which is an error.This is definitely a test design issue rather than a ClassDB issue, however.