Skip to content

Commit

Permalink
Merge pull request #1453 from tronprotocol/develop
Browse files Browse the repository at this point in the history
master
  • Loading branch information
zhaohong authored Sep 5, 2018
2 parents 0a6b89b + 1179429 commit 00e0cd2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions deploy.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash
ssh [email protected] -p 22008 sh /home/tron/workspace/deploy_all.sh
./gradlew stest
#ssh [email protected] -p 22008 sh /home/tron/workspace/deploy_all.sh
#./gradlew stest
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public void beforeSuite() {

@BeforeClass(enabled = true)
public void beforeClass() {
logger.info(account006Key);
PublicMethed.printAddress(account006Key);

channelFull = ManagedChannelBuilder.forTarget(fullnode)
.usePlaintext(true)
Expand Down Expand Up @@ -95,6 +95,7 @@ public void testGetAccountNet() {
Assert.assertTrue(accountNetMessage.getFreeNetUsed() == 0);
Assert.assertTrue(accountNetMessage.getTotalNetLimit() > 0);
Assert.assertTrue(accountNetMessage.getTotalNetWeight() > 0);
logger.info("testGetAccountNet");

}

Expand All @@ -110,6 +111,7 @@ public void testUseFreeNet() {
//Every transaction may cost 200 net.
Assert.assertTrue(accountNetMessage.getFreeNetUsed() > 0 && accountNetMessage
.getFreeNetUsed() < 300);
logger.info("testUseFreeNet");
}

@Test(enabled = true)
Expand All @@ -120,7 +122,8 @@ public void testUseMoneyToDoTransaction() {
Account request = Account.newBuilder().setAddress(addressBs).build();
AccountNetMessage accountNetMessage = blockingStubFull.getAccountNet(request);
//Use out the free net
while (accountNetMessage.getFreeNetUsed() < BASELINE) {
Integer times = 0;
while (accountNetMessage.getFreeNetUsed() < BASELINE && times++ < 30) {
PublicMethed.sendcoin(fromAddress,1L,account006Address,account006Key,
blockingStubFull);
accountNetMessage = blockingStubFull.getAccountNet(request);
Expand All @@ -134,6 +137,7 @@ public void testUseMoneyToDoTransaction() {
Long afterSendBalance = queryAccount.getBalance();
//when the free net is not enough and no balance freeze, use money to do the transaction.
Assert.assertTrue(beforeSendBalance - afterSendBalance > 1);
logger.info("testUseMoneyToDoTransaction");
}

@Test(enabled = true)
Expand Down

0 comments on commit 00e0cd2

Please sign in to comment.