This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Before | |
public void setup() { | |
Fixtures.delete(Category.class); | |
Fixtures.delete(Brand.class); | |
Fixtures.delete(Area.class); | |
Fixtures.delete(Order.class); | |
Fixtures.delete(OrderItems.class); | |
Fixtures.delete(Goods.class); | |
Fixtures.delete(User.class); | |
Fixtures.delete(ECoupon.class); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#{fixture delete:'all', load:'fixture/goods.yml' /} | |
#{selenium 'Test Home/index.html'} | |
open('/') | |
verifyTitle('一百券-网上消费券首选门户,消费券,代金券,优惠券,美食券,电子券,提货券') | |
verifyTextPresent('测试商品1') | |
verifyTextPresent('测试商品4') | |
#{/selenium} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void syncAmazon(final String sid) { | |
// play status 检查平均耗时 2.5s , 开放线程时间 3s 后回掉 | |
await(new Job<Selling>() { | |
@Override | |
public Selling doJobWithResult() throws Exception { | |
Selling selling = Selling.findById(sid); | |
selling.syncFromAmazon(); | |
return selling; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package util.transaction; | |
import play.Logger; | |
import play.db.jpa.JPA; | |
public class TransactionRetryUtil { | |
private static final int MAX_TRIED_TIMES = 15; | |
public static <T> T run(TransactionCallback<T> callback) { | |
for (int i = 0; i < MAX_TRIED_TIMES; i++) { | |
try { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# play status --secret=aC3NL1k6Zn9XEZbvMO6 | |
~ _ _ | |
~ _ __ | | __ _ _ _| | | |
~ | '_ \| |/ _' | || |_| | |
~ | __/|_|\____|\__ (_) | |
~ |_| |__/ | |
~ | |
~ play! 1.2.4, http://www.playframework.org | |
~ | |
~ Status from http://localhost:9402/@status, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package cache; | |
/** | |
* cache回调接口. | |
*/ | |
public interface CacheCallBack<T> { | |
T loadData(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#get root access | |
$su - | |
$ cd /tmp | |
#Remove old Ruby | |
$ yum remove ruby | |
# Install dependencies | |
$ yum groupinstall "Development Tools" | |
$ yum install zlib zlib-devel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
layout: post | |
title: Linux.x64 Oracle安装 | |
date: 2013-09-21 23:51:11 | |
comments: true | |
categories: [error,java,bash,bi,oracle,database,centos,linux] | |
--- | |
## 安装JDK | |
+ 1.直接执行 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Start the old vagrant | |
$ vagrant init centos-6.4 | |
$ vagrant up | |
# You should see a message like: | |
# [default] The guest additions on this VM do not match the install version of | |
# VirtualBox! This may cause things such as forwarded ports, shared | |
# folders, and more to not work properly. If any of those things fail on | |
# this machine, please update the guest additions and repackage the | |
# box. |
OlderNewer