为什么不能正常maven包呢
Bug 描述 工程下载下来后,解决工程爆红问题后。直接idea install 出现如下错误。为什么工程要加载单元测试案例
633769 127.0.0.1000 Node{key=8, value='127.0.0.8'} Node{key=10, value='127.0.0.10'} Node{key=100, value='127.0.0.100'} Node{key=1000, value='127.0.0.1000'} 127.0.0.1000 Tests run: 13, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.599 sec <<< FAILURE! - in com.crossoverjie.cim.common.data.construct.SortArrayMapTest add5(com.crossoverjie.cim.common.data.construct.SortArrayMapTest) Time elapsed: 0.119 sec <<< ERROR! java.lang.IllegalArgumentException: Comparison method violates its general contract! at java.util.TimSort.mergeHi(TimSort.java:899) at java.util.TimSort.mergeAt(TimSort.java:516) at java.util.TimSort.mergeCollapse(TimSort.java:439) at java.util.TimSort.sort(TimSort.java:245) at java.util.Arrays.sort(Arrays.java:1512) at com.crossoverjie.cim.common.data.construct.SortArrayMap.sort(SortArrayMap.java:81) at com.crossoverjie.cim.common.data.construct.SortArrayMapTest.add5(SortArrayMapTest.java:137) Running com.crossoverjie.cim.common.data.construct.TrieTreeTest java javascript jsf jsp jsf jsp java javascript jsf jsp java javascript ABC abC abC ABe ======== CDa Cde Cde Cdfff CDa CDfff crossoverJie Tests run: 19, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.002 sec - in com.crossoverjie.cim.common.data.construct.TrieTreeTest Running com.crossoverjie.cim.common.enums.SystemCommandEnumTypeTest :olu ----->��ȡ���������û� :emoji ----->emoji �����б� :qai ----->�ر� AI ģʽ :info ----->��ȡ�ͻ�����Ϣ :q ----->��:q �ؼ��֡���ѯ�����¼ :q! ----->�˳����� :ai ----->���� AI ģʽ :pu ----->ģ��ƥ���û� :all ----->��ȡ�������� :delay ----->delay message, :delay [msg] [delayTime] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec - in com.crossoverjie.cim.common.enums.SystemCommandEnumTypeTest Running com.crossoverjie.cim.common.route.algorithm.consistenthash.SortArrayMapConsistentHashTest value=zhangsan2 hash = 1407444926 127.0.0.9 value=1551253899106 hash = 2328281926 127.0.0.9 value=1551253899106 hash = 2328281926 45.78.28.220:9100:9081 value=1551253899106 hash = 2328281926 45.78.28.220:9100:10081 value=1551253899106 hash = 2328281926 45.78.28.220:9100:10081 value=1551253899106 hash = 2328281926 45.78.28.220:9100:00081 value=zhangsan hash = 133486337 127.0.0.9 Tests run: 7, Failures: 7, Errors: 0, Skipped: 0, Time elapsed: 0.01 sec <<< FAILURE! - in com.crossoverjie.cim.common.route.algorithm.consistenthash.SortArrayMapConsistentHashTest getFirstNodeValue2(com.crossoverjie.cim.common.route.algorithm.consistenthash.SortArrayMapConsistentHashTest) Time elapsed: 0.007 sec <<< FAILURE! org.junit.ComparisonFailure: expected:<127.0.0.[3]> but was:<127.0.0.[9]> at org.junit.Assert.assertEquals(Assert.java:115) at org.junit.Assert.assertEquals(Assert.java:144) at com.crossoverjie.cim.common.route.algorithm.consistenthash.SortArrayMapConsistentHashTest.getFirstNodeValue2(SortArrayMapConsistentHashTest.java:36) getFirstNodeValue3(com.crossoverjie.cim.common.route.algorithm.consistenthash.SortArrayMapConsistentHashTest) Time elapsed: 0.001 sec <<< FAILURE! org.junit.ComparisonFailure: expected:<127.0.0.[6]> but was:<127.0.0.[9]> at org.junit.Assert.assertEquals(Assert.java:115) at org.junit.Assert.assertEquals(Assert.java:144) at com.crossoverjie.cim.common.route.algorithm.consistenthash.SortArrayMapConsistentHashTest.getFirstNodeValue3(SortArrayMapConsistentHashTest.java:50) getFirstNodeValue4(com.crossoverjie.cim.common.route.algorithm.consistenthash.SortArrayMapConsistentHashTest) Time elapsed: 0 sec <<< FAILURE! org.junit.ComparisonFailure: expected:<45.78.28.220:9[000:8]081> but was:<45.78.28.220:9[100:9]081> at org.junit.Assert.assertEquals(Assert.java:115) at org.junit.Assert.assertEquals(Assert.java:144) at com.crossoverjie.cim.common.route.algorithm.consistenthash.SortArrayMapConsistentHashTest.getFirstNodeValue4(SortArrayMapConsistentHashTest.java:65) getFirstNodeValue5(com.crossoverjie.cim.common.route.algorithm.consistenthash.SortArrayMapConsistentHashTest) Time elapsed: 0 sec <<< FAILURE! org.junit.ComparisonFailure: expected:<45.78.28.220:9[000:8]081> but was:<45.78.28.220:9[100:10]081> at org.junit.Assert.assertEquals(Assert.java:115) at org.junit.Assert.assertEquals(Assert.java:144) at com.crossoverjie.cim.common.route.algorithm.consistenthash.SortArrayMapConsistentHashTest.getFirstNodeValue5(SortArrayMapConsistentHashTest.java:79) getFirstNodeValue6(com.crossoverjie.cim.common.route.algorithm.consistenthash.SortArrayMapConsistentHashTest) Time elapsed: 0.001 sec <<< FAILURE! org.junit.ComparisonFailure: expected:<45.78.28.220:9[000:8]081> but was:<45.78.28.220:9[100:10]081> at org.junit.Assert.assertEquals(Assert.java:115) at org.junit.Assert.assertEquals(Assert.java:144) at com.crossoverjie.cim.common.route.algorithm.consistenthash.SortArrayMapConsistentHashTest.getFirstNodeValue6(SortArrayMapConsistentHashTest.java:94) getFirstNodeValue7(com.crossoverjie.cim.common.route.algorithm.consistenthash.SortArrayMapConsistentHashTest) Time elapsed: 0 sec <<< FAILURE! org.junit.ComparisonFailure: expected:<45.78.28.220:9[000:8]081> but was:<45.78.28.220:9[100:00]081> at org.junit.Assert.assertEquals(Assert.java:115) at org.junit.Assert.assertEquals(Assert.java:144) at com.crossoverjie.cim.common.route.algorithm.consistenthash.SortArrayMapConsistentHashTest.getFirstNodeValue7(SortArrayMapConsistentHashTest.java:109) getFirstNodeValue(com.crossoverjie.cim.common.route.algorithm.consistenthash.SortArrayMapConsistentHashTest) Time elapsed: 0.001 sec <<< FAILURE! org.junit.ComparisonFailure: expected:<127.0.0.[2]> but was:<127.0.0.[9]> at org.junit.Assert.assertEquals(Assert.java:115) at org.junit.Assert.assertEquals(Assert.java:144) at com.crossoverjie.cim.common.route.algorithm.consistenthash.SortArrayMapConsistentHashTest.getFirstNodeValue(SortArrayMapConsistentHashTest.java:21) Running com.crossoverjie.cim.common.route.algorithm.consistenthash.TreeMapConsistentHashTest value=zhangsan2 hash = 1407444926 127.0.0.9 value=1551253899106 hash = 2328281926 127.0.0.9 value=zhangsan hash = 133486337 127.0.0.9 Tests run: 3, Failures: 3, Errors: 0, Skipped: 0, Time elapsed: 0 sec <<< FAILURE! - in com.crossoverjie.cim.common.route.algorithm.consistenthash.TreeMapConsistentHashTest getFirstNodeValue2(com.crossoverjie.cim.common.route.algorithm.consistenthash.TreeMapConsistentHashTest) Time elapsed: 0 sec <<< FAILURE! org.junit.ComparisonFailure: expected:<127.0.0.[3]> but was:<127.0.0.[9]> at org.junit.Assert.assertEquals(Assert.java:115) at org.junit.Assert.assertEquals(Assert.java:144) at com.crossoverjie.cim.common.route.algorithm.consistenthash.TreeMapConsistentHashTest.getFirstNodeValue2(TreeMapConsistentHashTest.java:37) getFirstNodeValue3(com.crossoverjie.cim.common.route.algorithm.consistenthash.TreeMapConsistentHashTest) Time elapsed: 0 sec <<< FAILURE! org.junit.ComparisonFailure: expected:<127.0.0.[6]> but was:<127.0.0.[9]> at org.junit.Assert.assertEquals(Assert.java:115) at org.junit.Assert.assertEquals(Assert.java:144) at com.crossoverjie.cim.common.route.algorithm.consistenthash.TreeMapConsistentHashTest.getFirstNodeValue3(TreeMapConsistentHashTest.java:52) getFirstNodeValue(com.crossoverjie.cim.common.route.algorithm.consistenthash.TreeMapConsistentHashTest) Time elapsed: 0 sec <<< FAILURE! org.junit.ComparisonFailure: expected:<127.0.0.[2]> but was:<127.0.0.[9]> at org.junit.Assert.assertEquals(Assert.java:115) at org.junit.Assert.assertEquals(Assert.java:144) at com.crossoverjie.cim.common.route.algorithm.consistenthash.TreeMapConsistentHashTest.getFirstNodeValue(TreeMapConsistentHashTest.java:21) Running com.crossoverjie.cim.common.util.HttpClientTest Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 2.332 sec <<< FAILURE! - in com.crossoverjie.cim.common.util.HttpClientTest call(com.crossoverjie.cim.common.util.HttpClientTest) Time elapsed: 2.332 sec <<< ERROR! java.net.ConnectException: Failed to connect to /127.0.0.1:8081 at okhttp3.internal.io.RealConnection.connectSocket(RealConnection.java:187) at okhttp3.internal.io.RealConnection.buildConnection(RealConnection.java:170) at okhttp3.internal.io.RealConnection.connect(RealConnection.java:111) at okhttp3.internal.http.StreamAllocation.findConnection(StreamAllocation.java:187) at okhttp3.internal.http.StreamAllocation.findHealthyConnection(StreamAllocation.java:123) at okhttp3.internal.http.StreamAllocation.newStream(StreamAllocation.java:93) at okhttp3.internal.http.HttpEngine.connect(HttpEngine.java:296) at okhttp3.internal.http.HttpEngine.sendRequest(HttpEngine.java:248) at okhttp3.RealCall.getResponse(RealCall.java:243) at okhttp3.RealCall$ApplicationInterceptorChain.proceed(RealCall.java:201) at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:163) at okhttp3.RealCall.execute(RealCall.java:57) at com.crossoverjie.cim.common.util.HttpClient.call(HttpClient.java:30) at com.crossoverjie.cim.common.util.HttpClientTest.call(HttpClientTest.java:31) Results : Failed tests: SortArrayMapConsistentHashTest.getFirstNodeValue:21 expected:<127.0.0.[2]> but was:<127.0.0.[9]> SortArrayMapConsistentHashTest.getFirstNodeValue2:36 expected:<127.0.0.[3]> but was:<127.0.0.[9]> SortArrayMapConsistentHashTest.getFirstNodeValue3:50 expected:<127.0.0.[6]> but was:<127.0.0.[9]> SortArrayMapConsistentHashTest.getFirstNodeValue4:65 expected:<45.78.28.220:9[000:8]081> but was:<45.78.28.220:9[100:9]081> SortArrayMapConsistentHashTest.getFirstNodeValue5:79 expected:<45.78.28.220:9[000:8]081> but was:<45.78.28.220:9[100:10]081> SortArrayMapConsistentHashTest.getFirstNodeValue6:94 expected:<45.78.28.220:9[000:8]081> but was:<45.78.28.220:9[100:10]081> SortArrayMapConsistentHashTest.getFirstNodeValue7:109 expected:<45.78.28.220:9[000:8]081> but was:<45.78.28.220:9[100:00]081> TreeMapConsistentHashTest.getFirstNodeValue:21 expected:<127.0.0.[2]> but was:<127.0.0.[9]> TreeMapConsistentHashTest.getFirstNodeValue2:37 expected:<127.0.0.[3]> but was:<127.0.0.[9]> TreeMapConsistentHashTest.getFirstNodeValue3:52 expected:<127.0.0.[6]> but was:<127.0.0.[9]> Tests in error: SortArrayMapTest.add5:137 » IllegalArgument Comparison method violates its gen... HttpClientTest.call:31 » Connect Failed to connect to /127.0.0.1:8081 Tests run: 46, Failures: 10, Errors: 2, Skipped: 0
复现 复现步骤:
- Go to '...'
- Click on '....'
- Scroll down to '....'
- See error
预期结果 A clear and concise description of what you expected to happen.
截图 If applicable, add screenshots to help explain your problem.
附加信息 Add any other context about the problem here.
Source: crossoverJie/cim