-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(GODT-2202): Report update errors to connector
When applying updates from the connector report the error, if any, via the channel the connector is using to wait for the update to complete its execution. Extend the dummy connector with an option to allow updates to fail as it is impossible to avoid these under certain circumstances.
- Loading branch information
1 parent
07a5a07
commit 7dc070e
Showing
9 changed files
with
122 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,6 +46,7 @@ func TestMaxUIDLimitRespected_Append(t *testing.T) { | |
|
||
func TestMaxMessageLimitRespected_Copy(t *testing.T) { | ||
runOneToOneTestClientWithAuth(t, defaultServerOptions(t, withIMAPLimits(testIMAPLimits())), func(client *client.Client, session *testSession) { | ||
session.setUpdatesAllowedToFail("user", true) | ||
require.NoError(t, client.Create("mbox1")) | ||
require.NoError(t, doAppendWithClient(client, "mbox1", "To: [email protected]", time.Now())) | ||
require.NoError(t, doAppendWithClient(client, "INBOX", "To: [email protected]", time.Now())) | ||
|
@@ -57,6 +58,7 @@ func TestMaxMessageLimitRespected_Copy(t *testing.T) { | |
|
||
func TestMaxUIDLimitRespected_Copy(t *testing.T) { | ||
runOneToOneTestClientWithAuth(t, defaultServerOptions(t, withIMAPLimits(testIMAPLimits())), func(client *client.Client, session *testSession) { | ||
session.setUpdatesAllowedToFail("user", true) | ||
require.NoError(t, client.Create("mbox1")) | ||
require.NoError(t, doAppendWithClient(client, "mbox1", "To: [email protected]", time.Now())) | ||
require.NoError(t, doAppendWithClient(client, "INBOX", "To: [email protected]", time.Now())) | ||
|
@@ -76,6 +78,7 @@ func TestMaxUIDLimitRespected_Copy(t *testing.T) { | |
|
||
func TestMaxMessageLimitRespected_Move(t *testing.T) { | ||
runOneToOneTestClientWithAuth(t, defaultServerOptions(t, withIMAPLimits(testIMAPLimits())), func(client *client.Client, session *testSession) { | ||
session.setUpdatesAllowedToFail("user", true) | ||
require.NoError(t, client.Create("mbox1")) | ||
require.NoError(t, doAppendWithClient(client, "mbox1", "To: [email protected]", time.Now())) | ||
require.NoError(t, doAppendWithClient(client, "INBOX", "To: [email protected]", time.Now())) | ||
|
@@ -87,6 +90,7 @@ func TestMaxMessageLimitRespected_Move(t *testing.T) { | |
|
||
func TestMaxUIDLimitRespected_Move(t *testing.T) { | ||
runOneToOneTestClientWithAuth(t, defaultServerOptions(t, withIMAPLimits(testIMAPLimits())), func(client *client.Client, session *testSession) { | ||
session.setUpdatesAllowedToFail("user", true) | ||
require.NoError(t, client.Create("mbox1")) | ||
require.NoError(t, doAppendWithClient(client, "mbox1", "To: [email protected]", time.Now())) | ||
require.NoError(t, doAppendWithClient(client, "INBOX", "To: [email protected]", time.Now())) | ||
|
@@ -106,6 +110,7 @@ func TestMaxUIDLimitRespected_Move(t *testing.T) { | |
|
||
func TestMaxUIDValidityLimitRespected(t *testing.T) { | ||
runOneToOneTestClientWithAuth(t, defaultServerOptions(t, withIMAPLimits(testIMAPLimits())), func(client *client.Client, session *testSession) { | ||
session.setUpdatesAllowedToFail("user", true) | ||
require.NoError(t, client.Create("mbox1")) | ||
require.NoError(t, client.Delete("mbox1")) | ||
require.Error(t, client.Create("mbox2")) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -80,9 +80,12 @@ func TestRecentAppend(t *testing.T) { | |
} | ||
|
||
func TestRecentStore(t *testing.T) { | ||
runManyToOneTestWithAuth(t, defaultServerOptions(t), []int{1, 2}, func(c map[int]*testConnection, _ *testSession) { | ||
runManyToOneTestWithAuth(t, defaultServerOptions(t), []int{1, 2}, func(c map[int]*testConnection, s *testSession) { | ||
mbox, done := c[1].doCreateTempDir() | ||
defer done() | ||
defer func() { | ||
s.flush("user") | ||
done() | ||
}() | ||
|
||
// Create a message in mbox. | ||
c[1].doAppend(mbox, `To: [email protected]`).expect(`OK`) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters