delay_test.go 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. package archive
  2. import (
  3. "context"
  4. "testing"
  5. . "github.com/smartystreets/goconvey/convey"
  6. )
  7. func Test_Delay(t *testing.T) {
  8. var (
  9. err error
  10. )
  11. Convey("PopMsgCache", t, WithDao(func(d *Dao) {
  12. _, err = d.Delay(context.Background(), 10098814, 1)
  13. So(err, ShouldBeNil)
  14. }))
  15. }
  16. func Test_TxUpDelay(t *testing.T) {
  17. var (
  18. err error
  19. c = context.Background()
  20. )
  21. Convey("TxUpDelay", t, WithDao(func(d *Dao) {
  22. tx, _ := d.BeginTran(c)
  23. _, err = d.TxUpDelay(tx, 0, 0, 0, 0, 0)
  24. So(err, ShouldBeNil)
  25. tx.Commit()
  26. }))
  27. }
  28. func Test_TxUpDelState(t *testing.T) {
  29. var (
  30. err error
  31. c = context.Background()
  32. )
  33. Convey("TxUpDelState", t, WithDao(func(d *Dao) {
  34. tx, _ := d.BeginTran(c)
  35. _, err = d.TxUpDelState(tx, 0, 0, 0)
  36. So(err, ShouldBeNil)
  37. tx.Commit()
  38. }))
  39. }
  40. func Test_TxUpDelayDtime(t *testing.T) {
  41. var (
  42. err error
  43. c = context.Background()
  44. )
  45. Convey("TxUpDelayDtime", t, WithDao(func(d *Dao) {
  46. tx, _ := d.BeginTran(c)
  47. _, err = d.TxUpDelayDtime(tx, 0, 0, 0)
  48. So(err, ShouldBeNil)
  49. tx.Commit()
  50. }))
  51. }
  52. func Test_TxDelDelay(t *testing.T) {
  53. var (
  54. err error
  55. c = context.Background()
  56. )
  57. Convey("TxDelDelay", t, WithDao(func(d *Dao) {
  58. tx, _ := d.BeginTran(c)
  59. _, err = d.TxDelDelay(tx, 0, 0)
  60. So(err, ShouldBeNil)
  61. tx.Commit()
  62. }))
  63. }