org.apache.james.imap.scripts.ConcurrentExistsResponse.test Maven / Gradle / Ivy
################################################################
# Licensed to the Apache Software Foundation (ASF) under one #
# or more contributor license agreements. See the NOTICE file #
# distributed with this work for additional information #
# regarding copyright ownership. The ASF licenses this file #
# to you under the Apache License, Version 2.0 (the #
# "License"); you may not use this file except in compliance #
# with the License. You may obtain a copy of the License at #
# #
# http://www.apache.org/licenses/LICENSE-2.0 #
# #
# Unless required by applicable law or agreed to in writing, #
# software distributed under the License is distributed on an #
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY #
# KIND, either express or implied. See the License for the #
# specific language governing permissions and limitations #
# under the License. #
################################################################
# Tests that appending a message from one session triggers an EXISTS and RECENT response
# in a concurrent session on the same mailbox
SESSION: 1
C: 1a CREATE existsresponse
S: 1a OK CREATE completed.
C: 1b STATUS existsresponse (MESSAGES)
S: \* STATUS \"existsresponse\" \(MESSAGES 0\)
S: 1b OK STATUS completed.
SESSION: 2
C: 2a SELECT existsresponse
S: \* FLAGS \(\\Answered \\Deleted \\Draft \\Flagged \\Seen\)
S: \* 0 EXISTS
S: \* 0 RECENT
S: \* OK \[UIDVALIDITY \d+\]
S: \* OK \[PERMANENTFLAGS \(\\Answered \\Deleted \\Draft \\Flagged \\Seen\)\]
S: \* OK \[UIDNEXT 1\]
S: 2a OK \[READ-WRITE\] SELECT completed.
SESSION: 3
C: 3a SELECT existsresponse
S: \* FLAGS \(\\Answered \\Deleted \\Draft \\Flagged \\Seen\)
S: \* 0 EXISTS
S: \* 0 RECENT
S: \* OK \[UIDVALIDITY \d+\]
S: \* OK \[PERMANENTFLAGS \(\\Answered \\Deleted \\Draft \\Flagged \\Seen\)\]
S: \* OK \[UIDNEXT 1\]
S: 3a OK \[READ-WRITE\] SELECT completed.
SESSION: 4
C: 4a SELECT existsresponse
S: \* FLAGS \(\\Answered \\Deleted \\Draft \\Flagged \\Seen\)
S: \* 0 EXISTS
S: \* 0 RECENT
S: \* OK \[UIDVALIDITY \d+\]
S: \* OK \[PERMANENTFLAGS \(\\Answered \\Deleted \\Draft \\Flagged \\Seen\)\]
S: \* OK \[UIDNEXT 1\]
S: 4a OK \[READ-WRITE\] SELECT completed.
SESSION: 1
C: 1c APPEND existsresponse {310+}
C: Date: Mon, 7 Feb 1994 21:52:25 -0800 (PST)
C: From: Fred Foobar
C: Subject: afternoon meeting
C: To: [email protected]
C: Message-Id:
C: MIME-Version: 1.0
C: Content-Type: TEXT/PLAIN; CHARSET=US-ASCII
C:
C: Hello Joe, do you think we can meet at 3:30 tomorrow?
C:
S: 1c OK APPEND completed.
C: 1b STATUS existsresponse (MESSAGES RECENT)
S: \* STATUS \"existsresponse\" \(MESSAGES 1 RECENT 1\)
S: 1b OK STATUS completed.
# EXISTS response on NOOP
SESSION: 2
C: 2b NOOP
S: \* 1 EXISTS
S: \* 0 RECENT
S: 2b OK NOOP completed.
C: 2c CLOSE
S: 2c OK CLOSE completed.
# EXISTS response on STORE (recent is no longer set)
SESSION: 3
C: 3b STORE 1 +FLAGS.SILENT (\Flagged)
S: \* 1 EXISTS
S: \* 0 RECENT
S: 3b OK STORE completed.
C: 3c CLOSE
S: 3c OK CLOSE completed.
# EXISTS response on CREATE
SESSION: 4
C: 4b CREATE another
S: \* 1 EXISTS
S: \* 0 RECENT
S: \* 1 FETCH \(FLAGS \(\\Flagged\)\)
S: 4b OK CREATE completed.
C: 4c DELETE another
S: 4c OK DELETE completed.
C: 4c DELETE existsresponse
S: 4c OK DELETE completed.