Skip to content

Commit

Permalink
remove assertTrue(true)
Browse files Browse the repository at this point in the history
  • Loading branch information
chaosuper123321 committed Jan 10, 2025
1 parent 42e79c2 commit 81a04e5
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

import lombok.extern.slf4j.Slf4j;
import org.junit.After;
import org.junit.Assert;
import org.junit.Test;
import org.tron.core.vm.program.Program;

Expand Down Expand Up @@ -49,8 +48,6 @@ public void testSetResultCode1() throws Exception {
= new Program.JVMStackOverFlowException();
programResult.setException(jvmStackOverFlowException);
privateMethod.invoke(runtime, programResult);

Assert.assertTrue(true);
}

}
8 changes: 0 additions & 8 deletions framework/src/test/java/org/tron/core/WalletMockTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,6 @@ public void testSetTransactionNullException() throws Exception {
"setTransaction", TransactionCapsule.class);
privateMethod.setAccessible(true);
privateMethod.invoke(wallet, transactionCapsuleMock);

assertTrue(true);
}

@Test
Expand All @@ -130,7 +128,6 @@ public void testCreateTransactionCapsuleWithoutValidateWithTimeoutNullException(
long.class);
privateMethod.setAccessible(true);
privateMethod.invoke(wallet, message, contractType, timeout);
assertTrue(true);
}
}

Expand Down Expand Up @@ -164,8 +161,6 @@ public void testCreateTransactionCapsuleWithoutValidateWithTimeout()
long.class);
privateMethod.setAccessible(true);
privateMethod.invoke(wallet, message, contractType, timeout);

assertTrue(true);
}
}

Expand Down Expand Up @@ -1108,7 +1103,6 @@ public void testGetShieldedTRC20LogType1() {
} catch (Exception e) {
assertTrue(false);
}
assertTrue(true);
}


Expand Down Expand Up @@ -1141,7 +1135,6 @@ public void testGetShieldedTRC20LogType2() {
} catch (Exception e) {
assertTrue(false);
}
assertTrue(true);
}

@Test
Expand Down Expand Up @@ -1222,7 +1215,6 @@ public void testBuildShieldedTRC20InputWithAK1() throws Exception {
builder,
spendNote,
ak, nk);
assertTrue(true);
}

}
Expand Down
7 changes: 0 additions & 7 deletions framework/src/test/java/org/tron/core/db/ManagerMockTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
import org.quartz.CronExpression;
import org.tron.common.parameter.CommonParameter;
import org.tron.common.runtime.ProgramResult;
import org.tron.common.runtime.RuntimeImpl;
import org.tron.common.utils.Sha256Hash;
import org.tron.core.ChainBaseManager;
import org.tron.core.capsule.BlockCapsule;
Expand Down Expand Up @@ -327,8 +326,6 @@ public void testProcessTransaction() throws Exception {
TransactionCapsule.class, BlockCapsule.class);
privateMethod.setAccessible(true);
privateMethod.invoke(dbManager, transactionCapsuleMock, blockCapsuleMock);

assertTrue(true);
}

@Test
Expand Down Expand Up @@ -369,7 +366,6 @@ public void testRePush() {
when(transactionStoreMock.has(any())).thenReturn(true);

dbManager.rePush(trx);
assertTrue(true);
}

@SneakyThrows
Expand Down Expand Up @@ -409,7 +405,6 @@ public void testRePush1() {

doThrow(new TooBigTransactionResultException()).when(dbManager).pushTransaction(any());
dbManager.rePush(trx);
assertTrue(true);
}

@Test
Expand All @@ -420,7 +415,6 @@ public void testPostSolidityFilter() throws Exception {
"postSolidityFilter", long.class, long.class);
privateMethod.setAccessible(true);
privateMethod.invoke(dbManager, 100L, 10L);
assertTrue(true);
}

@Test
Expand All @@ -442,7 +436,6 @@ public void testReOrgLogsFilter() throws Exception {
Method privateMethod = Manager.class.getDeclaredMethod("reOrgLogsFilter");
privateMethod.setAccessible(true);
privateMethod.invoke(dbManager);
assertTrue(true);
}

}
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package org.tron.core.net.peer;

import static org.junit.Assert.assertTrue;
import static org.mockito.Mockito.doThrow;
import static org.mockito.Mockito.spy;

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

// the initialDelay of scheduleWithFixedDelay is 5s
Thread.sleep(5000L);
assertTrue(true);
}

}

0 comments on commit 81a04e5

Please sign in to comment.