提交 055c01c6 编写于 作者: W wenzhouwww

set go proxy as 'goproxy.cn' and modify case error about case002

上级 6ba94735
...@@ -8,7 +8,7 @@ if "%severIp%"=="" (set severIp=127.0.0.1) ...@@ -8,7 +8,7 @@ if "%severIp%"=="" (set severIp=127.0.0.1)
if "%serverPort%"=="" (set serverPort=6030) if "%serverPort%"=="" (set serverPort=6030)
go env -w GO111MODULE=on go env -w GO111MODULE=on
go env -w GOPROXY=https://goproxy.io,direct go env -w GOPROXY=https://goproxy.cn,direct
cd case001 cd case001
case001.bat %severIp% %serverPort% case001.bat %severIp% %serverPort%
......
...@@ -14,7 +14,7 @@ if [ ! -n "$serverPort" ]; then ...@@ -14,7 +14,7 @@ if [ ! -n "$serverPort" ]; then
fi fi
go env -w GO111MODULE=on go env -w GO111MODULE=on
go env -w GOPROXY=https://goproxy.io,direct go env -w GOPROXY=https://goproxy.cn,direct
bash ./case001/case001.sh $severIp $serverPort bash ./case001/case001.sh $severIp $serverPort
bash ./case002/case002.sh $severIp $serverPort bash ./case002/case002.sh $severIp $serverPort
......
@echo off @echo off
echo ==== start run cases001.go echo ==== start run cases002.go
del go.* del go.*
go mod init demotest go mod init demotest
......
...@@ -43,10 +43,9 @@ func main() { ...@@ -43,10 +43,9 @@ func main() {
os.Exit(1) os.Exit(1)
} }
defer db.Close() defer db.Close()
db.Exec("drop if exists database test") db.Exec("drop database if exists test")
db.Exec("create if not exists database test") db.Exec("create database if not exists test")
db.Exec("use test") db.Exec("use test")
db.Exec("drop if exists database test")
db.Exec("create table test (ts timestamp ,level int)") db.Exec("create table test (ts timestamp ,level int)")
for i := 0; i < 10; i++ { for i := 0; i < 10; i++ {
sqlcmd := fmt.Sprintf("insert into test values(%d,%d)", ts+i, i) sqlcmd := fmt.Sprintf("insert into test values(%d,%d)", ts+i, i)
......
#!/bin/bash #!/bin/bash
echo "==== start run cases001.go" echo "==== start run cases002.go"
set +e set +e
#set -x #set -x
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册