opensource4you / astraea

釋放kafka的無限潛能
Apache License 2.0
129 stars 46 forks source link

[WEB] change groupInstanceId from String to Optional<String> #1722

Closed yangminglintw closed 1 year ago

yangminglintw commented 1 year ago

related #1252

將 groupInstanceId 從 String 改為 Optional

chia7712 commented 1 year ago

麻煩看一下QA 應該是code style 沒有通過

yangminglintw commented 1 year ago

我修復code style問題,麻煩再看下

chia7712 commented 1 year ago

GroupHandlerTest > testListGroups() FAILED
    org.opentest4j.AssertionFailedError: expected: <null> but was: <Optional.empty>
        at app//org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:151)
        at app//org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:132)
        at app//org.junit.jupiter.api.AssertNull.failNotNull(AssertNull.java:50)
        at app//org.junit.jupiter.api.AssertNull.assertNull(AssertNull.java:35)
        at app//org.junit.jupiter.api.AssertNull.assertNull(AssertNull.java:30)
        at app//org.junit.jupiter.api.Assertions.assertNull(Assertions.java:276)
        at app//org.astraea.app.web.GroupHandlerTest.lambda$testListGroups$1(GroupHandlerTest.java:66)
        at java.base@17.0.6/java.lang.Iterable.forEach(Iterable.java:75)
        at app//org.astraea.app.web.GroupHandlerTest.testListGroups(GroupHandlerTest.java:66)

這個測試失敗應該跟這隻PR有關,麻煩處理一下喔

yangminglintw commented 1 year ago

我將測試改成測試Optional.empty(),不確定這樣改動有符合原本測試結果的預期嗎?

chia7712 commented 1 year ago

我將測試改成測試Optional.empty(),不確定這樣改動有符合原本測試結果的預期嗎?

有的,感謝幫忙