Skip to content

Commit

Permalink
Fix codespell and license issue
Browse files Browse the repository at this point in the history
  • Loading branch information
tsaitsung-han.tht committed Sep 18, 2024
1 parent c4af8fe commit 7c968bd
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 5 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/csharp_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,4 @@ jobs:
working-directory: ./csharp
run: |
dotnet build
dotnet tool install -g dotnet-format
dotnet-format --check
dotnet test -l "console;verbosity=detailed"
17 changes: 17 additions & 0 deletions csharp/tests/ClientManagerTest.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/*
* 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.
*/

using System;
using System.Collections.Concurrent;
using Apache.Rocketmq.V2;
Expand Down
5 changes: 2 additions & 3 deletions csharp/tests/ProcessQueueTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public async Task TestEraseMessageWithConsumeOk()
}

[TestMethod]
public async Task TestEraseMessageWithFailure()
public async Task TestEraseMessageWithAckFailure()
{
var pushConsumer = CreateAndSetupPushConsumer();
var messageView = CreateMessageView();
Expand All @@ -138,10 +138,9 @@ public async Task TestEraseMessageWithFailure()
processQueue.CacheMessages(new List<MessageView> { messageView });

var ackTimes = 3;
var tolerance = TimeSpan.FromMilliseconds(500);

processQueue.EraseMessage(messageView, ConsumeResult.SUCCESS);
await Task.Delay(ProcessQueue.AckMessageFailureBackoffDelay * ackTimes + tolerance);
await Task.Delay(ProcessQueue.AckMessageFailureBackoffDelay * ackTimes);

mockClientManager.Verify(cm => cm.AckMessage(It.IsAny<Endpoints>(), It.IsAny<Proto.AckMessageRequest>(), It.IsAny<TimeSpan>()), Times.AtLeast(ackTimes));
}
Expand Down
17 changes: 17 additions & 0 deletions csharp/tests/PushConsumerTest.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/*
* 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.
*/

using System;
using System.Collections.Concurrent;
using System.Threading;
Expand Down
2 changes: 2 additions & 0 deletions style/codespell/ignore_words.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# csharp keyword
AtLeast
# guava
errorprone
# rust keyword
Expand Down

0 comments on commit 7c968bd

Please sign in to comment.