Skip to content

Commit

Permalink
err fix
Browse files Browse the repository at this point in the history
  • Loading branch information
YuanhuanO committed Oct 7, 2024
1 parent 4b6e435 commit 5e6f9e4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
8 changes: 4 additions & 4 deletions timing/rob/rob.go
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,8 @@ func (b *ReorderBuffer) topDown(now sim.VTimeInSec) bool {

trans.reqToBottom.Meta().Src = b.bottomPort
trans.reqToBottom.Meta().SendTime = now
sendErr := b.bottomPort.Send(trans.reqToBottom)
if sendErr != nil {
err := b.bottomPort.Send(trans.reqToBottom)
if err != nil {
GlobalMilestoneManager.AddMilestone(
b.getTaskID(),
"Network Error",
Expand Down Expand Up @@ -309,8 +309,8 @@ func (b *ReorderBuffer) bottomUp(now sim.VTimeInSec) bool {
rsp.Meta().Src = b.topPort
rsp.Meta().SendTime = now

sendErr := b.bottomPort.Send(trans.reqToBottom)
if sendErr != nil {
err := b.topPort.Send(rsp)
if err != nil {
GlobalMilestoneManager.AddMilestone(
b.getTaskID(),
"Network Error",
Expand Down
4 changes: 0 additions & 4 deletions timing/rob/rob_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ var _ = Describe("Reorder Buffer", func() {

AfterEach(func() {
mockCtrl.Finish()
err := rob.ExportMilestonesToCSV("milestones.csv")
Expect(err).ToNot(HaveOccurred(), "Failed to export milestones")
})

Context("top-down", func() {
Expand All @@ -58,8 +56,6 @@ var _ = Describe("Reorder Buffer", func() {
madeProgress := rob.topDown(10)

Expect(madeProgress).To(BeFalse())
err := rob.ExportMilestonesToCSV("milestones.csv")
Expect(err).ToNot(HaveOccurred(), "Failed to export milestones")
})

It("should do nothing if no message arriving", func() {
Expand Down

0 comments on commit 5e6f9e4

Please sign in to comment.