“慢生活”不是懒惰,放慢速度不是拖延时间,而是让我们在生活中寻找到平衡。网站首页程序人生
phpunit类方法运行生命周期
发布时间:2021-09-19 19:29:01作者:雪饮
![[!--pagekey--]](/d/file/manshenghuo/chengxurensheng/59136916d03d71cc1cac62979eff8148.png)
上篇了解了setUp在phpunit中是在每个测试方法之前运行,而tearDown则是在每个测试方法之后运行。另外,setUpBeforeClass() 与 tearDownAfterClass() 模板方法将分别在测试用例
阅读全文>>phpunit基境-setUp
发布时间:2021-09-19 18:01:43作者:雪饮
![[!--pagekey--]](/e/data/images/notimg.gif)
像下面这样一个phpunit测试类:StackTest.php:<?php declare(strict_types=1);
use PHPUnit\Framework\TestCase;
final class StackTest extends TestCase
{
private $s
redis乐观锁解决超卖超买问题
发布时间:2021-09-19 16:30:40作者:雪饮
![[!--pagekey--]](/d/file/manshenghuo/chengxurensheng/54a686b3a01fef8ed3a7d68ff66ca18d.png)
在前篇https://www.gaojiupan.cn/manshenghuo/chengxurensheng/4010.html中用mysql中的悲观锁解决了超卖超买的情况,那么悲观锁毕竟性能消耗巨大。基于https://www.gaojiupa
阅读全文>>centos7下redis配置远程连接
发布时间:2021-09-19 15:31:26作者:雪饮
![[!--pagekey--]](/d/file/manshenghuo/chengxurensheng/1347565183b178710a889258615e45fe.png)
首先这里下载的redis是redis-6.2.5.tar.gz解压安装就很简单make MALLOC=libcmake install安装完成后配置远程访问在redis.conf中:1、配置外网:bind 127.0.0.1 192.168.43.170
阅读全文>>php竞拍抢购系统中的超买超卖的复现与mysql悲观锁解决方案
发布时间:2021-09-18 20:58:11作者:雪饮
![[!--pagekey--]](/d/file/manshenghuo/chengxurensheng/dc84a257d26999bfa16bc618921630db.png)
基于上篇https://www.gaojiupan.cn/manshenghuo/chengxurensheng/4009.html实现了pthreads扩展的安装。那么接下来就复现下php竞拍系统中超买超卖的场景(高并发)。这里就用de
阅读全文>>