Skip to content

Commit 81a04e5

Browse files
remove assertTrue(true)
1 parent 42e79c2 commit 81a04e5

File tree

4 files changed

+0
-20
lines changed

4 files changed

+0
-20
lines changed

framework/src/test/java/org/tron/common/runtime/RuntimeImplMockTest.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
import lombok.extern.slf4j.Slf4j;
66
import org.junit.After;
7-
import org.junit.Assert;
87
import org.junit.Test;
98
import org.tron.core.vm.program.Program;
109

@@ -49,8 +48,6 @@ public void testSetResultCode1() throws Exception {
4948
= new Program.JVMStackOverFlowException();
5049
programResult.setException(jvmStackOverFlowException);
5150
privateMethod.invoke(runtime, programResult);
52-
53-
Assert.assertTrue(true);
5451
}
5552

5653
}

framework/src/test/java/org/tron/core/WalletMockTest.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,6 @@ public void testSetTransactionNullException() throws Exception {
105105
"setTransaction", TransactionCapsule.class);
106106
privateMethod.setAccessible(true);
107107
privateMethod.invoke(wallet, transactionCapsuleMock);
108-
109-
assertTrue(true);
110108
}
111109

112110
@Test
@@ -130,7 +128,6 @@ public void testCreateTransactionCapsuleWithoutValidateWithTimeoutNullException(
130128
long.class);
131129
privateMethod.setAccessible(true);
132130
privateMethod.invoke(wallet, message, contractType, timeout);
133-
assertTrue(true);
134131
}
135132
}
136133

@@ -164,8 +161,6 @@ public void testCreateTransactionCapsuleWithoutValidateWithTimeout()
164161
long.class);
165162
privateMethod.setAccessible(true);
166163
privateMethod.invoke(wallet, message, contractType, timeout);
167-
168-
assertTrue(true);
169164
}
170165
}
171166

@@ -1108,7 +1103,6 @@ public void testGetShieldedTRC20LogType1() {
11081103
} catch (Exception e) {
11091104
assertTrue(false);
11101105
}
1111-
assertTrue(true);
11121106
}
11131107

11141108

@@ -1141,7 +1135,6 @@ public void testGetShieldedTRC20LogType2() {
11411135
} catch (Exception e) {
11421136
assertTrue(false);
11431137
}
1144-
assertTrue(true);
11451138
}
11461139

11471140
@Test
@@ -1222,7 +1215,6 @@ public void testBuildShieldedTRC20InputWithAK1() throws Exception {
12221215
builder,
12231216
spendNote,
12241217
ak, nk);
1225-
assertTrue(true);
12261218
}
12271219

12281220
}

framework/src/test/java/org/tron/core/db/ManagerMockTest.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
import org.quartz.CronExpression;
3535
import org.tron.common.parameter.CommonParameter;
3636
import org.tron.common.runtime.ProgramResult;
37-
import org.tron.common.runtime.RuntimeImpl;
3837
import org.tron.common.utils.Sha256Hash;
3938
import org.tron.core.ChainBaseManager;
4039
import org.tron.core.capsule.BlockCapsule;
@@ -327,8 +326,6 @@ public void testProcessTransaction() throws Exception {
327326
TransactionCapsule.class, BlockCapsule.class);
328327
privateMethod.setAccessible(true);
329328
privateMethod.invoke(dbManager, transactionCapsuleMock, blockCapsuleMock);
330-
331-
assertTrue(true);
332329
}
333330

334331
@Test
@@ -369,7 +366,6 @@ public void testRePush() {
369366
when(transactionStoreMock.has(any())).thenReturn(true);
370367

371368
dbManager.rePush(trx);
372-
assertTrue(true);
373369
}
374370

375371
@SneakyThrows
@@ -409,7 +405,6 @@ public void testRePush1() {
409405

410406
doThrow(new TooBigTransactionResultException()).when(dbManager).pushTransaction(any());
411407
dbManager.rePush(trx);
412-
assertTrue(true);
413408
}
414409

415410
@Test
@@ -420,7 +415,6 @@ public void testPostSolidityFilter() throws Exception {
420415
"postSolidityFilter", long.class, long.class);
421416
privateMethod.setAccessible(true);
422417
privateMethod.invoke(dbManager, 100L, 10L);
423-
assertTrue(true);
424418
}
425419

426420
@Test
@@ -442,7 +436,6 @@ public void testReOrgLogsFilter() throws Exception {
442436
Method privateMethod = Manager.class.getDeclaredMethod("reOrgLogsFilter");
443437
privateMethod.setAccessible(true);
444438
privateMethod.invoke(dbManager);
445-
assertTrue(true);
446439
}
447440

448441
}

framework/src/test/java/org/tron/core/net/peer/PeerStatusCheckMockTest.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package org.tron.core.net.peer;
22

3-
import static org.junit.Assert.assertTrue;
43
import static org.mockito.Mockito.doThrow;
54
import static org.mockito.Mockito.spy;
65

@@ -22,7 +21,6 @@ public void testInitException() throws InterruptedException {
2221

2322
// the initialDelay of scheduleWithFixedDelay is 5s
2423
Thread.sleep(5000L);
25-
assertTrue(true);
2624
}
2725

2826
}

0 commit comments

Comments
 (0)